]> git.sur5r.net Git - cc65/blobdiff - src/cc65/error.h
Fixed two compiler warnings.
[cc65] / src / cc65 / error.h
index 37b60afa560f7352503a5a76af99446c160f1a0b..5830367e1d37d30fb721a1c440a6eed5c54c6e62 100644 (file)
@@ -6,10 +6,10 @@
 /*                                                                           */
 /*                                                                           */
 /*                                                                           */
-/* (C) 1998-2000 Ullrich von Bassewitz                                       */
-/*               Wacholderweg 14                                             */
-/*               D-70597 Stuttgart                                           */
-/* EMail:        uz@musoftware.de                                            */
+/* (C) 1998-2011, Ullrich von Bassewitz                                      */
+/*                Roemerstrasse 52                                           */
+/*                D-70794 Filderstadt                                        */
+/* EMail:         uz@cc65.org                                                */
 /*                                                                           */
 /*                                                                           */
 /* This software is provided 'as-is', without any expressed or implied       */
 
 
 
+#include <stdio.h>
+
 /* common */
 #include "attrib.h"
+#include "intstack.h"
 
 /* cc65 */
 #include "lineinfo.h"
 extern unsigned ErrorCount;
 extern unsigned WarningCount;
 
+/* Warning and error options */
+extern IntStack WarnEnable;             /* Enable warnings */
+extern IntStack WarningsAreErrors;      /* Treat warnings as errors */
+                                        /* Warn about: */
+extern IntStack WarnConstComparison;    /* - constant comparison results */
+extern IntStack WarnNoEffect;           /* - statements without an effect */
+extern IntStack WarnStructParam;        /* - structs passed by val */
+extern IntStack WarnUnusedLabel;        /* - unused labels */
+extern IntStack WarnUnusedParam;        /* - unused parameters */
+extern IntStack WarnUnusedVar;          /* - unused variables */
+extern IntStack WarnUnknownPragma;      /* - unknown #pragmas */
+
 
 
 /*****************************************************************************/
@@ -64,14 +79,11 @@ extern unsigned WarningCount;
 
 
 
-void Warning (const char* Format, ...) attribute ((format (printf, 1, 2)));
-/* Print warning message. */
-
-void LIWarning (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
-/* Print a warning message with the line info given explicitly */
+void Fatal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
+/* Print a message about a fatal error and die */
 
-void PPWarning (const char* Format, ...) attribute ((format (printf, 1, 2)));
-/* Print warning message. For use within the preprocessor. */
+void Internal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
+/* Print a message about an internal compiler error and die. */
 
 void Error (const char* Format, ...) attribute ((format (printf, 1, 2)));
 /* Print an error message */
@@ -82,11 +94,22 @@ void LIError (const LineInfo* LI, const char* Format, ...) attribute ((format (p
 void PPError (const char* Format, ...) attribute ((format (printf, 1, 2)));
 /* Print an error message. For use within the preprocessor.  */
 
-void Fatal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
-/* Print a message about a fatal error and die */
+void Warning (const char* Format, ...) attribute ((format (printf, 1, 2)));
+/* Print warning message. */
 
-void Internal (const char* Format, ...) attribute ((noreturn, format (printf, 1, 2)));
-/* Print a message about an internal compiler error and die. */
+void LIWarning (const LineInfo* LI, const char* Format, ...) attribute ((format (printf, 2, 3)));
+/* Print a warning message with the line info given explicitly */
+
+void PPWarning (const char* Format, ...) attribute ((format (printf, 1, 2)));
+/* Print warning message. For use within the preprocessor. */
+
+IntStack* FindWarning (const char* Name);
+/* Search for a warning in the WarnMap table and return a pointer to the
+ * intstack that holds its state. Return NULL if there is no such warning.
+ */
+
+void ListWarnings (FILE* F);
+/* Print a list of warning types/names to the given file */
 
 void ErrorReport (void);
 /* Report errors (called at end of compile) */