/*
-** LCLint - annotation-assisted static program checker
+** Splint - annotation-assisted static program checker
** Copyright (C) 1994-2000 University of Virginia,
** Massachusetts Institute of Technology
**
**
** For information on lclint: lclint-request@cs.virginia.edu
** To report a bug: lclint-bug@cs.virginia.edu
-** For more information: http://lclint.cs.virginia.edu
+** For more information: http://www.splint.org
*/
+
/*
** constraintList.c
**
llassert (constraintList_isDefined (s));
/*drl7x */
- // el = constraint_simplify (el);
+
if (constraintList_resolve (el, s) )
{
constraint_free (el);
{
loc = constraint_getFileloc(elem);
- if(fileloc_isUndefined(loc) )
+ if (fileloc_isUndefined(loc))
{
ret = constraintList_add (ret, elem);
}
- else if (context_suppressFlagMsg(FLG_ARRAYBOUNDS, loc) )
+ else if (context_suppressFlagMsg(FLG_BOUNDSWRITE, loc) )
{
- DPRINTF(( message("constraintList_removeSurpressed getting rid of surpressed constraint %q", constraint_print(elem) ) ));
+ DPRINTF ((message ("constraintList_removeSurpressed getting rid of surpressed constraint %q",
+ constraint_print(elem))));
constraint_free(elem);
}
- else if ( (! constraint_hasMaxSet(elem) ) && context_suppressFlagMsg(FLG_ARRAYBOUNDSREAD, loc) )
+ else if (!constraint_hasMaxSet(elem) && context_suppressFlagMsg(FLG_BOUNDSREAD, loc))
{
- DPRINTF(( message("constraintList_removeSurpressed getting rid of surpressed constraint %q", constraint_print(elem) ) ));
+ DPRINTF ((message("constraintList_removeSurpressed getting rid of surpressed constraint %q",
+ constraint_print(elem))));
constraint_free(elem);
}
else
return (constraintList_print(s));
}
-
-
+# if 0
static /*@only@*/ cstring
constraintList_printLocation (/*@temp@*/ constraintList s) /*@*/
{
{
st = message ("%q, %q", st, type);
}
- } //end for
+ }
return st;
}
-
+# endif
/*@only@*/ cstring
constraintList_print (/*@temp@*/ constraintList s) /*@*/
{
st = message ("%q, %q", st, type);
}
- } //end for
+ }
return st;
}
{
constraint temp;
constraintList ret;
- DPRINTF ( (message ("Logical or on %s and %s",
+ DPRINTF ((message ("Logical or on %s and %s",
constraintList_print(l1),
constraintList_print(l2)) ) );
constraintList_elements_private (c, el)
{
- // el = constraint_preserveOrig (el);
el = constraint_setFcnPre(el);
el = constraint_origAddGeneratingExpr (el, fcn);
}
/*@only@*/ constraintList constraintList_undump (FILE *f)
{
constraintList ret;
- char *s = mstring_create (MAX_DUMP_LINE_LENGTH);
+ char *s;
char *os;
ret = constraintList_makeNew();
- os = s;
+ os = mstring_create (MAX_DUMP_LINE_LENGTH);
s = fgets (os, MAX_DUMP_LINE_LENGTH, f);
while (s != NULL && *s != ';')
constraintList constraintList_sort (/*@returned@*/ constraintList ret)
{
-
- DPRINTF(( message("Before constraint_sort %q", constraintList_printLocation(ret) ) ));
-
qsort (ret->elements, (size_t) ret->nelements,
- (sizeof (*ret->elements) ), constraint_compare);
-
- DPRINTF((message("After constraint_sort %q", constraintList_printLocation(ret) ) ));
-
- DPRINTF((message("onstraint_sort returning") ));
+ (sizeof (*ret->elements)),
+ (int (*)(const void *, const void *)) constraint_compare);
+
+ DPRINTF((message("onstraint_sort returning") ));
return ret;
}