]> andersk Git - splint.git/blobdiff - src/warnClause.c
Fixed -help <mode> bug.
[splint.git] / src / warnClause.c
index ae6d2baeb3169ef60c229dc6ee35dea4fc26c213..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
@@ -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.034914 seconds and 4 git commands to generate.