From d7ddc3d12eb42664d7ab5f138993cb566dd51d11 Mon Sep 17 00:00:00 2001 From: cuz Date: Thu, 27 Jul 2000 20:40:44 +0000 Subject: [PATCH] Use gcc attribs, fixed a wrong arg git-svn-id: svn://svn.cc65.org/cc65/trunk@211 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ld65/error.h | 11 ++++++++--- src/ld65/expr.c | 10 ++++++---- src/ld65/make/gcc.mak | 2 +- 3 files changed, 15 insertions(+), 8 deletions(-) diff --git a/src/ld65/error.h b/src/ld65/error.h index 9f213abe2..2ce1c8601 100644 --- a/src/ld65/error.h +++ b/src/ld65/error.h @@ -38,6 +38,11 @@ +/* common */ +#include "attrib.h" + + + /*****************************************************************************/ /* Data */ /*****************************************************************************/ @@ -57,13 +62,13 @@ extern const char _MsgFail []; -void Warning (const char* Format, ...); +void Warning (const char* Format, ...) attribute((format(printf,1,2))); /* Print a warning message */ -void Error (const char* Format, ...); +void Error (const char* Format, ...) attribute((format(printf,1,2))); /* Print an error message and die */ -void Internal (const char* Format, ...); +void Internal (const char* Format, ...) attribute((format(printf,1,2))); /* Print an internal error message and die */ #define CHECK(c) \ diff --git a/src/ld65/expr.c b/src/ld65/expr.c index 4122e5681..ed65a991c 100644 --- a/src/ld65/expr.c +++ b/src/ld65/expr.c @@ -33,9 +33,11 @@ -#include "../common/exprdefs.h" -#include "../common/xmalloc.h" - +/* common */ +#include "exprdefs.h" +#include "xmalloc.h" + +/* ld65 */ #include "global.h" #include "error.h" #include "fileio.h" @@ -253,7 +255,7 @@ int IsConstExpr (ExprNode* Root) * which in turn means, that we have a circular reference. */ if (ExportHasMark (E)) { - Error ("Circular reference for symbol `%s', %s(%u)", + Error ("Circular reference for symbol `%s', %s(%lu)", E->Name, E->Obj->Files [E->Pos.Name], E->Pos.Line); Const = 0; } else { diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index 8423a059c..b0be2f660 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -4,7 +4,7 @@ # Default for the compiler lib search path as compiler define CDEFS=-DCC65_LIB=\"/usr/lib/cc65/lib/\" -CFLAGS = -g -O2 -Wall $(CDEFS) +CFLAGS = -g -O2 -Wall -I../common $(CDEFS) CC=gcc LDFLAGS= -- 2.39.5