]> andersk Git - splint.git/blobdiff - src/warnClause.c
noexpand always false.
[splint.git] / src / warnClause.c
index cbe2e4d42320f4dfc80a107043f2f2b02c92ee3e..38ff5ba9dc36260f232c5bd5181b2cadf9836fc8 100644 (file)
@@ -1,6 +1,6 @@
 /*
 ** Splint - annotation-assisted static program checker
-** Copyright (C) 1994-2002 University of Virginia,
+** Copyright (C) 1994-2003 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 information on splint: info@splint.org
+** To report a bug: splint-bug@splint.org
 ** For more information: http://www.splint.org
 */
 /*
 ** warnClause.c
 */
 
-# include "lclintMacros.nf"
+# include "splintMacros.nf"
 # include "basic.h"
 
 static warnClause warnClause_createAux (/*@only@*/ fileloc loc, 
@@ -38,14 +38,24 @@ static warnClause warnClause_createAux (/*@only@*/ fileloc loc,
   res->flag = flag;
   res->msg = msg;
   
+  DPRINTF (("Creating warn clause with flag spec: [%p] %s", flag,
+           flagSpec_unparse (flag)));
   return res;
 }
 
 extern warnClause warnClause_create (lltok tok, flagSpec flag, cstring msg) 
 {
   warnClause res;
-  res = warnClause_createAux (lltok_stealLoc (tok), flag, msg);
-  lltok_release (tok);
+  /*
+  ** evans 2002-03-11
+  ** was
+  **   res = warnClause_createAux (lltok_stealLoc (tok), flag, msg);
+  ** but this leads to unexplained (yet) crashes.
+  ** Reported by Walter Briscoe
+  */
+
+  res = warnClause_createAux (fileloc_copy (lltok_getLoc (tok)), flag, msg);
+  lltok_free (tok);
   return res;
 }
 
This page took 0.029617 seconds and 4 git commands to generate.