From: cuz Date: Thu, 14 Aug 2003 21:09:03 +0000 (+0000) Subject: Add gcc attributes, fixed a format string problem X-Git-Tag: V2.12.0~1419 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=c6078cae225aad958501aaaa5936c5451de4297f;p=cc65 Add gcc attributes, fixed a format string problem git-svn-id: svn://svn.cc65.org/cc65/trunk@2315 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ca65/error.h b/src/ca65/error.h index 1d6611318..8809166c3 100644 --- a/src/ca65/error.h +++ b/src/ca65/error.h @@ -39,6 +39,7 @@ /* common */ +#include "attrib.h" #include "filepos.h" @@ -190,10 +191,10 @@ void PError (const FilePos* Pos, unsigned ErrNum, ...); void ErrorSkip (unsigned ErrNum, ...); /* Print an error message and skip the rest of the line */ -void Fatal (unsigned FatNum, ...); +void Fatal (unsigned FatNum, ...) attribute ((noreturn)); /* Print a message about a fatal error and die */ -void Internal (const char* Format, ...); +void Internal (const char* Format, ...) attribute((noreturn, format(printf,1,2))); /* Print a message about an internal compiler error and die. */ diff --git a/src/ca65/pseudo.c b/src/ca65/pseudo.c index 8dac9820c..e9eec2a5d 100644 --- a/src/ca65/pseudo.c +++ b/src/ca65/pseudo.c @@ -816,7 +816,7 @@ static void DoFileOpt (void) break; default: - Internal ("Invalid OptNum: %l", OptNum); + Internal ("Invalid OptNum: %ld", OptNum); }