]> andersk Git - splint.git/blobdiff - src/llmain.c
Added the flag warnsysfiles (default +) if this flag is set splint warns if the user...
[splint.git] / src / llmain.c
index ab6be13280d3222272050bfff6d50ce206777a1d..86f8de5699ec3aff1bf1c664ac5dd5e97cd393a8 100644 (file)
@@ -114,6 +114,8 @@ static /*@only@*/ /*@null@*/ inputStream initFile = inputStream_undefined;
 static fileIdList preprocessFiles (fileIdList, bool)
   /*@modifies fileSystem@*/ ;
 
+  void warnSysFiles(fileIdList files) /*@*/;
+
 # ifndef NOLCL
 
 static
@@ -1355,6 +1357,7 @@ int main (int argc, char *argv[])
       context_setPreprocessing ();
       dercfiles = preprocessFiles (xfiles, TRUE);
       tfiles = preprocessFiles (cfiles, FALSE);
+      warnSysFiles(cfiles);
       dercfiles = fileIdList_append (dercfiles, tfiles);
       fileIdList_free (tfiles);
 
@@ -2780,3 +2783,16 @@ char *specFullName (char *specfile, /*@out@*/ char **inpath)
   return specname;
 }
 # endif
+
+void warnSysFiles(fileIdList files)
+{
+  fileIdList_elements (files, file)
+    {
+      
+      if (fileTable_isSystemFile (context_fileTable (), file) )
+       {
+         voptgenerror (FLG_WARNSYSFILES, message ("Warning %s is a considered a system file. No errors in this file will be reported.", fileTable_rootFileName (file) ), g_currentloc);
+       }
+    } 
+  end_fileIdList_elements;
+}
This page took 0.029262 seconds and 4 git commands to generate.