- Some warnings are only interesting when checking.
This commit is contained in:
parent
29f0756f0a
commit
d9a37b62b3
@ -298,12 +298,15 @@ defineUsertype (Tac tcdu)
|
|||||||
/* oi!, there's already one. Let's hope is is a type too. */
|
/* oi!, there's already one. Let's hope is is a type too. */
|
||||||
if (inTermlist (tfind->stype, TERM_Type))
|
if (inTermlist (tfind->stype, TERM_Type))
|
||||||
{
|
{
|
||||||
/* phew. warn anyway */
|
if (switches.check)
|
||||||
globalError++;
|
{
|
||||||
eprintf ("warning: double declaration of usertype ");
|
/* phew. warn anyway */
|
||||||
termPrint (tfind);
|
globalError++;
|
||||||
eprintf ("\n");
|
eprintf ("warning: double declaration of usertype ");
|
||||||
globalError--;
|
termPrint (tfind);
|
||||||
|
eprintf ("\n");
|
||||||
|
globalError--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -1807,16 +1810,19 @@ checkRoleVariables (const System sys, const Protocol p, const Role r)
|
|||||||
{
|
{
|
||||||
if (!inTermlist (vars, declared->term))
|
if (!inTermlist (vars, declared->term))
|
||||||
{
|
{
|
||||||
// Warning
|
if (switches.check)
|
||||||
globalError++;
|
{
|
||||||
eprintf ("warning: variable ");
|
// Warning
|
||||||
termPrint (declared->term);
|
globalError++;
|
||||||
eprintf (" was declared in role ");
|
eprintf ("warning: variable ");
|
||||||
termPrint (p->nameterm);
|
termPrint (declared->term);
|
||||||
eprintf (",");
|
eprintf (" was declared in role ");
|
||||||
termPrint (r->nameterm);
|
termPrint (p->nameterm);
|
||||||
eprintf (" but never used in a read event.\n");
|
eprintf (",");
|
||||||
globalError--;
|
termPrint (r->nameterm);
|
||||||
|
eprintf (" but never used in a read event.\n");
|
||||||
|
globalError--;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
declared = declared->next;
|
declared = declared->next;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user