/*
-** LCLint - annotation-assisted static program checker
-** Copyright (C) 1994-2001 University of Virginia,
+** Splint - annotation-assisted static program checker
+** Copyright (C) 1994-2002 University of Virginia,
** Massachusetts Institute of Technology
**
** This program is free software; you can redistribute it and/or modify it
** the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
** MA 02111-1307, USA.
**
-** 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 information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
+** For more information: http://www.splint.org
*/
/*
** qual.c
** representation of type qualifiers
*/
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
# include "basic.h"
static qual qual_createPlainAux (int i)
res->kind = (quenum) i;
res->info = annotationInfo_undefined;
- /*@i23@*/ return res;
+ sfreeEventually (res); /* stored in qtable */
+ return res;
}
extern qual qual_createPlain (quenum q)
res = (qual) dmalloc (sizeof (*res));
res->kind = QU_USERANNOT;
- /*@i423@*/ res->info = info;
+ res->info = info;
- /*@i2583@*/ return res;
+ sfreeEventually (res); /* Memory leak */
+ return res;
}
static bool quenum_isValid (int q)
case QU_RELNULL: return cstring_makeLiteralTemp ("relnull");
case QU_NOTNULL: return cstring_makeLiteralTemp ("notnull");
case QU_NULLTERMINATED: return cstring_makeLiteralTemp ("nullterminated");
- case QU_RETURNED: return cstring_makeLiteralTemp (" returned");
+ case QU_RETURNED: return cstring_makeLiteralTemp ("returned");
case QU_EXPOSED: return cstring_makeLiteralTemp ("exposed");
- case QU_EXITS: return cstring_makeLiteralTemp ("exits");
- case QU_MAYEXIT: return cstring_makeLiteralTemp ("mayexit");
+ case QU_EXITS: return cstring_makeLiteralTemp ("noreturn");
+ case QU_MAYEXIT: return cstring_makeLiteralTemp ("maynotreturn");
case QU_UNUSED: return cstring_makeLiteralTemp ("unused");
case QU_EXTERNAL: return cstring_makeLiteralTemp ("external");
case QU_SEF: return cstring_makeLiteralTemp ("sef");
case QU_TEMPREF: return cstring_makeLiteralTemp ("tempref");
case QU_OWNED: return cstring_makeLiteralTemp ("owned");
case QU_DEPENDENT: return cstring_makeLiteralTemp ("dependent");
- case QU_NEVEREXIT: return cstring_makeLiteralTemp ("neverexit");
- case QU_TRUEEXIT: return cstring_makeLiteralTemp ("trueexit");
- case QU_FALSEEXIT: return cstring_makeLiteralTemp ("falseexit");
+ case QU_NEVEREXIT: return cstring_makeLiteralTemp ("alwaysreturns");
+ case QU_TRUEEXIT: return cstring_makeLiteralTemp ("noreturnwhentrue");
+ case QU_FALSEEXIT: return cstring_makeLiteralTemp ("noreturnwhenfalse");
case QU_UNDEF: return cstring_makeLiteralTemp ("undef");
case QU_KILLED: return cstring_makeLiteralTemp ("killed");
case QU_PRINTFLIKE: return cstring_makeLiteralTemp ("printflike");
/* Cannot call qual_create after this... */
-/*@i23@*/ static void qual_free (qual q)
+# if 0
+static void qual_free (qual q)
{
llassert (FALSE);
sfree (q);
}
+# endif
extern cstring qual_dump (qual q)
{