From: cuz Date: Sun, 30 Sep 2001 22:04:19 +0000 (+0000) Subject: Used __attribute ((unused)) instead of -Wno-unused-parameter X-Git-Tag: V2.12.0~2600 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=453a8b704fdcefb5ce88185d233281415a47a992;p=cc65 Used __attribute ((unused)) instead of -Wno-unused-parameter git-svn-id: svn://svn.cc65.org/cc65/trunk@987 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- diff --git a/src/ld65/bin.c b/src/ld65/bin.c index 318185266..017b5a15c 100644 --- a/src/ld65/bin.c +++ b/src/ld65/bin.c @@ -100,7 +100,8 @@ void FreeBinDesc (BinDesc* D) static unsigned BinWriteExpr (ExprNode* E, int Signed, unsigned Size, - unsigned long Offs, void* Data) + unsigned long Offs attribute ((unused)), + void* Data) /* Called from SegWrite for an expression. Evaluate the expression, check the * range and write the expression value to the file. */ @@ -216,7 +217,7 @@ static void BinWriteMem (BinDesc* D, Memory* M) -static int BinUnresolved (const char* Name, void* D) +static int BinUnresolved (const char* Name attribute ((unused)), void* D) /* Called if an unresolved symbol is encountered */ { /* Unresolved symbols are an error in binary format. Bump the counter diff --git a/src/ld65/fileinfo.c b/src/ld65/fileinfo.c index e8e31b4d2..97dba6aa1 100644 --- a/src/ld65/fileinfo.c +++ b/src/ld65/fileinfo.c @@ -43,7 +43,7 @@ /*****************************************************************************/ -/* Code */ +/* Code */ /*****************************************************************************/ @@ -60,7 +60,7 @@ static FileInfo* NewFileInfo (void) -FileInfo* ReadFileInfo (FILE* F, ObjData* O) +FileInfo* ReadFileInfo (FILE* F, ObjData* O attribute ((unused))) /* Read a file info from a file and return it */ { /* Allocate a new FileInfo structure */ diff --git a/src/ld65/main.c b/src/ld65/main.c index e1a046d47..d765e79b6 100644 --- a/src/ld65/main.c +++ b/src/ld65/main.c @@ -215,7 +215,7 @@ static void LinkFile (const char* Name) -static void OptConfig (const char* Opt, const char* Arg) +static void OptConfig (const char* Opt attribute ((unused)), const char* Arg) /* Define the config file */ { if (CfgAvail ()) { @@ -226,7 +226,7 @@ static void OptConfig (const char* Opt, const char* Arg) -static void OptDbgFile (const char* Opt, const char* Arg) +static void OptDbgFile (const char* Opt attribute ((unused)), const char* Arg) /* Give the name of the debug file */ { DbgFileName = Arg; @@ -234,7 +234,8 @@ static void OptDbgFile (const char* Opt, const char* Arg) -static void OptHelp (const char* Opt, const char* Arg) +static void OptHelp (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Print usage information and exit */ { Usage (); @@ -243,7 +244,7 @@ static void OptHelp (const char* Opt, const char* Arg) -static void OptMapFile (const char* Opt, const char* Arg) +static void OptMapFile (const char* Opt attribute ((unused)), const char* Arg) /* Give the name of the map file */ { MapFileName = Arg; @@ -259,7 +260,7 @@ static void OptStartAddr (const char* Opt, const char* Arg) -static void OptTarget (const char* Opt, const char* Arg) +static void OptTarget (const char* Opt attribute ((unused)), const char* Arg) /* Set the target system */ { const TargetDesc* D; @@ -280,7 +281,8 @@ static void OptTarget (const char* Opt, const char* Arg) -static void OptVersion (const char* Opt, const char* Arg) +static void OptVersion (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Print the assembler version */ { fprintf (stderr, @@ -295,18 +297,18 @@ int main (int argc, char* argv []) { /* Program long options */ static const LongOpt OptTab[] = { - { "--config", 1, OptConfig }, + { "--config", 1, OptConfig }, { "--dbgfile", 1, OptDbgFile }, - { "--help", 0, OptHelp }, - { "--mapfile", 1, OptMapFile }, - { "--start-addr", 1, OptStartAddr }, - { "--target", 1, OptTarget }, - { "--version", 0, OptVersion }, + { "--help", 0, OptHelp }, + { "--mapfile", 1, OptMapFile }, + { "--start-addr", 1, OptStartAddr }, + { "--target", 1, OptTarget }, + { "--version", 0, OptVersion }, }; unsigned I; - /* Initialize the cmdline module */ + /* Initialize the cmdline module */ InitCmdLine (&argc, &argv, "ld65"); /* Evaluate the CC65_LIB environment variable */ diff --git a/src/ld65/make/gcc.mak b/src/ld65/make/gcc.mak index a2e4bdd82..3412acf47 100644 --- a/src/ld65/make/gcc.mak +++ b/src/ld65/make/gcc.mak @@ -7,7 +7,7 @@ COMMON = ../common # Default for the compiler lib search path as compiler define CDEFS=-DCC65_LIB=\"/usr/lib/cc65/lib/\" -CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON) $(CDEFS) +CFLAGS = -g -O2 -Wall -W -I$(COMMON) $(CDEFS) CC=gcc EBIND=emxbind LDFLAGS= diff --git a/src/ld65/o65.c b/src/ld65/o65.c index ad41fb77c..8aa25e65e 100644 --- a/src/ld65/o65.c +++ b/src/ld65/o65.c @@ -606,7 +606,7 @@ static void O65WriteSeg (O65Desc* D, SegDesc** Seg, unsigned Count, int DoWrite) -static void O65WriteTextSeg (O65Desc* D, Memory* M) +static void O65WriteTextSeg (O65Desc* D, Memory* M attribute ((unused))) /* Write the code segment to the o65 output file */ { /* Initialize variables */ @@ -621,7 +621,7 @@ static void O65WriteTextSeg (O65Desc* D, Memory* M) -static void O65WriteDataSeg (O65Desc* D, Memory* M) +static void O65WriteDataSeg (O65Desc* D, Memory* M attribute ((unused))) /* Write the data segment to the o65 output file */ { /* Initialize variables */ @@ -636,7 +636,7 @@ static void O65WriteDataSeg (O65Desc* D, Memory* M) -static void O65WriteBssSeg (O65Desc* D, Memory* M) +static void O65WriteBssSeg (O65Desc* D, Memory* M attribute ((unused))) /* "Write" the bss segments to the o65 output file. This will only update * the relevant header fields. */ @@ -653,7 +653,7 @@ static void O65WriteBssSeg (O65Desc* D, Memory* M) -static void O65WriteZPSeg (O65Desc* D, Memory* M) +static void O65WriteZPSeg (O65Desc* D, Memory* M attribute ((unused))) /* "Write" the zeropage segments to the o65 output file. This will only update * the relevant header fields. */