- Some warnings are only interesting when checking.

This commit is contained in:
ccremers 2006-08-08 12:35:43 +00:00
parent 29f0756f0a
commit d9a37b62b3

View File

@ -297,6 +297,8 @@ defineUsertype (Tac tcdu)
{
/* oi!, there's already one. Let's hope is is a type too. */
if (inTermlist (tfind->stype, TERM_Type))
{
if (switches.check)
{
/* phew. warn anyway */
globalError++;
@ -305,6 +307,7 @@ defineUsertype (Tac tcdu)
eprintf ("\n");
globalError--;
}
}
else
{
/* that's not right! */
@ -1806,6 +1809,8 @@ checkRoleVariables (const System sys, const Protocol p, const Role r)
while (declared != NULL)
{
if (!inTermlist (vars, declared->term))
{
if (switches.check)
{
// Warning
globalError++;
@ -1818,6 +1823,7 @@ checkRoleVariables (const System sys, const Protocol p, const Role r)
eprintf (" but never used in a read event.\n");
globalError--;
}
}
declared = declared->next;
}