]> andersk Git - splint.git/blobdiff - src/llerror.c
Merged this branch with the one in the splint.sf.net repository.
[splint.git] / src / llerror.c
index 023e99c8714519ff96c5809c945f5ae86cf311aa..5f3374756b5d856083c424f78a4ed1ff47142c9f 100644 (file)
@@ -34,6 +34,7 @@
 # include "llmain.h"
 # include "cpperror.h"
 # include "Headers/version.h" /* Visual C++ finds a different version.h on some path! */
+# include<assert.h>
 
 /* Don't allow possibly-recursive assertion failures. */
 # undef llassert
@@ -173,7 +174,16 @@ void llerror_flagWarning (cstring s)
 {
   if (context_getFlag (FLG_WARNFLAGS))
     {
-      llgenmsg (s, g_currentloc);
+      showHerald ();
+
+      if (fileloc_isBuiltin (g_currentloc))
+       {
+         llmsg (message ("Warning: %q", s));
+       }
+      else
+       {
+         llgenmsg (message ("Warning: %q", s), g_currentloc);
+       }
     }
   else
     {
@@ -1328,6 +1338,7 @@ xllfatalbug (char *srcFile, int srcLine, /*@only@*/ cstring s)
   showSourceLoc (srcFile, srcLine);
   printCodePoint ();
   printBugReport ();
+  assert(FALSE);
   llexit (LLFAILURE);
 }
 
@@ -1945,16 +1956,10 @@ static bool s_scanOpen = FALSE;
 
 void displayScan (cstring msg)
 {
-  if (s_scanOpen)
-    {
-      displayScanClose ();
-    }
-
   llassert (!s_scanOpen);
 
   if (context_getFlag (FLG_SHOWSCAN))
     {
-      showHerald ();
       fprintf (g_messagestream, "< %s >\n", cstring_toCharsSafe (msg));
       (void) fflush (g_messagestream);
     }
@@ -1964,11 +1969,6 @@ void displayScan (cstring msg)
 
 void displayScanOpen (cstring msg)
 {
-  if (s_scanOpen)
-    {
-      displayScanClose ();
-    }
-
   llassert (!s_scanOpen);
   s_scanOpen = TRUE;
 
This page took 0.033854 seconds and 4 git commands to generate.