From 91dac517802129a35413a50be866e72d791c4746 Mon Sep 17 00:00:00 2001 From: cuz Date: Sun, 30 Sep 2001 22:19:39 +0000 Subject: [PATCH] Use __attribute ((unused)) instead of -Wno-unused-parameter git-svn-id: svn://svn.cc65.org/cc65/trunk@988 b7a2c559-68d2-44c3-8de9-860c34a00d81 --- src/ca65/lineinfo.c | 5 ++-- src/ca65/macro.c | 4 +-- src/ca65/main.c | 50 ++++++++++++++++-------------------- src/ca65/make/gcc.mak | 2 +- src/ca65/symtab.c | 17 ++++++------ src/cl65/main.c | 60 ++++++++++++++++++++++++++----------------- src/cl65/make/gcc.mak | 2 +- src/cl65/spawn.c | 8 ++++-- src/da65/handler.c | 21 ++++++++------- src/da65/main.c | 22 ++++++++-------- src/da65/make/gcc.mak | 2 +- src/od65/main.c | 33 ++++++++++++++++-------- src/od65/make/gcc.mak | 2 +- 13 files changed, 125 insertions(+), 103 deletions(-) diff --git a/src/ca65/lineinfo.c b/src/ca65/lineinfo.c index 4ea2e73f1..6f81beaaf 100644 --- a/src/ca65/lineinfo.c +++ b/src/ca65/lineinfo.c @@ -129,7 +129,8 @@ void ClearLineInfo (void) -static int CmpLineInfo (void* Data, const void* LI1_, const void* LI2_) +static int CmpLineInfo (void* Data attribute ((unused)), + const void* LI1_, const void* LI2_) /* Compare function for the sort */ { /* Cast the pointers */ @@ -161,7 +162,7 @@ static int CmpLineInfo (void* Data, const void* LI1_, const void* LI2_) } } - + void MakeLineInfoIndex (void) /* Sort the line infos and drop all unreferenced ones */ diff --git a/src/ca65/macro.c b/src/ca65/macro.c index 0b3cc9caa..0e6bca3a1 100644 --- a/src/ca65/macro.c +++ b/src/ca65/macro.c @@ -758,7 +758,7 @@ void MacAbort (void) int IsMacro (const char* Name) /* Return true if the given name is the name of a macro */ { - return MacFind (SVal, HashStr (SVal) % HASHTAB_SIZE) != 0; + return MacFind (Name, HashStr (Name) % HASHTAB_SIZE) != 0; } @@ -766,7 +766,7 @@ int IsMacro (const char* Name) int IsDefine (const char* Name) /* Return true if the given name is the name of a define style macro */ { - Macro* M = MacFind (SVal, HashStr (SVal) % HASHTAB_SIZE); + Macro* M = MacFind (Name, HashStr (Name) % HASHTAB_SIZE); return (M != 0 && M->Style == MAC_STYLE_DEFINE); } diff --git a/src/ca65/main.c b/src/ca65/main.c index 6f6784f53..851078c7b 100644 --- a/src/ca65/main.c +++ b/src/ca65/main.c @@ -186,7 +186,8 @@ static void DefineSymbol (const char* Def) -static void OptAutoImport (const char* Opt, const char* Arg) +static void OptAutoImport (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Mark unresolved symbols as imported */ { AutoImport = 1; @@ -194,12 +195,9 @@ static void OptAutoImport (const char* Opt, const char* Arg) -static void OptCPU (const char* Opt, const char* Arg) +static void OptCPU (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --cpu option */ { - if (Arg == 0) { - NeedArg (Opt); - } if (strcmp (Arg, "6502") == 0) { SetCPU (CPU_6502); } else if (strcmp (Arg, "65C02") == 0) { @@ -217,7 +215,8 @@ static void OptCPU (const char* Opt, const char* Arg) -static void OptDebugInfo (const char* Opt, const char* Arg) +static void OptDebugInfo (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Add debug info to the object file */ { DbgSyms = 1; @@ -225,7 +224,7 @@ static void OptDebugInfo (const char* Opt, const char* Arg) -static void OptFeature (const char* Opt, const char* Arg) +static void OptFeature (const char* Opt attribute ((unused)), const char* Arg) /* Set an emulation feature */ { /* Set the feature, check for errors */ @@ -236,7 +235,8 @@ static void OptFeature (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 (); @@ -245,7 +245,8 @@ static void OptHelp (const char* Opt, const char* Arg) -static void OptIgnoreCase (const char* Opt, const char* Arg) +static void OptIgnoreCase (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Ignore case on symbols */ { IgnoreCase = 1; @@ -253,18 +254,16 @@ static void OptIgnoreCase (const char* Opt, const char* Arg) -static void OptIncludeDir (const char* Opt, const char* Arg) +static void OptIncludeDir (const char* Opt attribute ((unused)), const char* Arg) /* Add an include search path */ { - if (Arg == 0) { - NeedArg (Opt); - } AddIncludePath (Arg); } -static void OptListing (const char* Opt, const char* Arg) +static void OptListing (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Create a listing file */ { Listing = 1; @@ -272,14 +271,10 @@ static void OptListing (const char* Opt, const char* Arg) -static void OptPageLength (const char* Opt, const char* Arg) +static void OptPageLength (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --pagelength option */ { - int Len; - if (Arg == 0) { - NeedArg (Opt); - } - Len = atoi (Arg); + int Len = atoi (Arg); if (Len != -1 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) { AbEnd ("Invalid page length: %d", Len); } @@ -288,7 +283,8 @@ static void OptPageLength (const char* Opt, const char* Arg) -static void OptSmart (const char* Opt, const char* Arg) +static void OptSmart (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Handle the -s/--smart options */ { SmartMode = 1; @@ -296,13 +292,9 @@ static void OptSmart (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 */ { - if (Arg == 0) { - NeedArg (Opt); - } - /* Map the target name to a target id */ Target = FindTarget (Arg); if (Target == TGT_UNKNOWN) { @@ -312,7 +304,8 @@ static void OptTarget (const char* Opt, const char* Arg) -static void OptVerbose (const char* Opt, const char* Arg) +static void OptVerbose (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Increase verbosity */ { ++Verbosity; @@ -320,7 +313,8 @@ static void OptVerbose (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, diff --git a/src/ca65/make/gcc.mak b/src/ca65/make/gcc.mak index 028879ff4..2a0df89ef 100644 --- a/src/ca65/make/gcc.mak +++ b/src/ca65/make/gcc.mak @@ -5,7 +5,7 @@ # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON) +CFLAGS = -g -O2 -Wall -W -I$(COMMON) CC = gcc EBIND = emxbind LDFLAGS = diff --git a/src/ca65/symtab.c b/src/ca65/symtab.c index dc98fe3fa..c54445fae 100644 --- a/src/ca65/symtab.c +++ b/src/ca65/symtab.c @@ -596,7 +596,7 @@ void SymConDes (const char* Name, unsigned Type, unsigned Prio) CHECK (Type >= CD_TYPE_MIN && Type <= CD_TYPE_MAX); #else CHECK (Type <= CD_TYPE_MAX); -#endif +#endif CHECK (Prio >= CD_PRIO_MIN && Prio <= CD_PRIO_MAX); /* Don't accept local symbols */ @@ -1023,13 +1023,14 @@ void SymDump (FILE* F) while (S) { /* Ignore trampoline symbols */ if ((S->Flags & SF_TRAMPOLINE) != 0) { - printf ("%-24s %s %s %s %s %s\n", - S->Name, - (S->Flags & SF_DEFINED)? "DEF" : "---", - (S->Flags & SF_REFERENCED)? "REF" : "---", - (S->Flags & SF_IMPORT)? "IMP" : "---", - (S->Flags & SF_EXPORT)? "EXP" : "---", - (S->Flags & SF_ZP)? "ZP" : "--"); + fprintf (F, + "%-24s %s %s %s %s %s\n", + S->Name, + (S->Flags & SF_DEFINED)? "DEF" : "---", + (S->Flags & SF_REFERENCED)? "REF" : "---", + (S->Flags & SF_IMPORT)? "IMP" : "---", + (S->Flags & SF_EXPORT)? "EXP" : "---", + (S->Flags & SF_ZP)? "ZP" : "--"); } /* Next symbol */ S = S->List; diff --git a/src/cl65/main.c b/src/cl65/main.c index 901de03be..ff1bb9c8b 100644 --- a/src/cl65/main.c +++ b/src/cl65/main.c @@ -589,7 +589,8 @@ static void Usage (void) -static void OptAddSource (const char* Opt, const char* Arg) +static void OptAddSource (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Strict source code as comments to the generated asm code */ { CmdAddArg (&CC65, "-T"); @@ -597,7 +598,8 @@ static void OptAddSource (const char* Opt, const char* Arg) -static void OptAnsi (const char* Opt, const char* Arg) +static void OptAnsi (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Strict ANSI mode (compiler) */ { CmdAddArg (&CC65, "-A"); @@ -605,7 +607,7 @@ static void OptAnsi (const char* Opt, const char* Arg) -static void OptAsmIncludeDir (const char* Opt, const char* Arg) +static void OptAsmIncludeDir (const char* Opt attribute ((unused)), const char* Arg) /* Include directory (assembler) */ { CmdAddArg (&CA65, "-I"); @@ -614,7 +616,7 @@ static void OptAsmIncludeDir (const char* Opt, const char* Arg) -static void OptBssName (const char* Opt, const char* Arg) +static void OptBssName (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --bss-name option */ { CmdAddArg (&CC65, "--bss-name"); @@ -623,7 +625,8 @@ static void OptBssName (const char* Opt, const char* Arg) -static void OptCheckStack (const char* Opt, const char* Arg) +static void OptCheckStack (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Handle the --check-stack option */ { CmdAddArg (&CC65, "--check-stack"); @@ -631,7 +634,7 @@ static void OptCheckStack (const char* Opt, const char* Arg) -static void OptCodeName (const char* Opt, const char* Arg) +static void OptCodeName (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --code-name option */ { CmdAddArg (&CC65, "--code-name"); @@ -640,7 +643,7 @@ static void OptCodeName (const char* Opt, const char* Arg) -static void OptCodeSize (const char* Opt, const char* Arg) +static void OptCodeSize (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --codesize option */ { CmdAddArg (&CC65, "--codesize"); @@ -649,7 +652,7 @@ static void OptCodeSize (const char* Opt, const char* Arg) -static void OptCPU (const char* Opt, const char* Arg) +static void OptCPU (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --cpu option */ { /* Add the cpu type to the assembler and compiler */ @@ -661,7 +664,8 @@ static void OptCPU (const char* Opt, const char* Arg) -static void OptCreateDep (const char* Opt, const char* Arg) +static void OptCreateDep (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Handle the --create-dep option */ { CmdAddArg (&CC65, "--create-dep"); @@ -669,7 +673,7 @@ static void OptCreateDep (const char* Opt, const char* Arg) -static void OptDataName (const char* Opt, const char* Arg) +static void OptDataName (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --data-name option */ { CmdAddArg (&CC65, "--data-name"); @@ -678,7 +682,8 @@ static void OptDataName (const char* Opt, const char* Arg) -static void OptDebug (const char* Opt, const char* Arg) +static void OptDebug (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Debug mode (compiler) */ { CmdAddArg (&CC65, "-d"); @@ -686,7 +691,8 @@ static void OptDebug (const char* Opt, const char* Arg) -static void OptDebugInfo (const char* Opt, const char* Arg) +static void OptDebugInfo (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Debug Info - add to compiler and assembler */ { CmdAddArg (&CC65, "-g"); @@ -695,7 +701,7 @@ static void OptDebugInfo (const char* Opt, const char* Arg) -static void OptFeature (const char* Opt, const char* Arg) +static void OptFeature (const char* Opt attribute ((unused)), const char* Arg) /* Emulation features for the assembler */ { CmdAddArg (&CA65, "--feature"); @@ -704,7 +710,8 @@ static void OptFeature (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 help - cl65 */ { Usage (); @@ -713,7 +720,7 @@ static void OptHelp (const char* Opt, const char* Arg) -static void OptIncludeDir (const char* Opt, const char* Arg) +static void OptIncludeDir (const char* Opt attribute ((unused)), const char* Arg) /* Include directory (compiler) */ { CmdAddArg (&CC65, "-I"); @@ -722,7 +729,8 @@ static void OptIncludeDir (const char* Opt, const char* Arg) -static void OptListing (const char* Opt, const char* Arg) +static void OptListing (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Create an assembler listing */ { CmdAddArg (&CA65, "-l"); @@ -730,7 +738,7 @@ static void OptListing (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) /* Create a map file */ { /* Create a map file (linker) */ @@ -740,7 +748,7 @@ static void OptMapFile (const char* Opt, const char* Arg) -static void OptRodataName (const char* Opt, const char* Arg) +static void OptRodataName (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --rodata-name option */ { CmdAddArg (&CC65, "--rodata-name"); @@ -749,7 +757,8 @@ static void OptRodataName (const char* Opt, const char* Arg) -static void OptSignedChars (const char* Opt, const char* Arg) +static void OptSignedChars (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Make default characters signed */ { CmdAddArg (&CC65, "-j"); @@ -757,7 +766,7 @@ static void OptSignedChars (const char* Opt, const char* Arg) -static void OptStartAddr (const char* Opt, const char* Arg) +static void OptStartAddr (const char* Opt attribute ((unused)), const char* Arg) /* Set the default start address */ { CmdAddArg (&LD65, "-S"); @@ -766,7 +775,8 @@ static void OptStartAddr (const char* Opt, const char* Arg) -static void OptStaticLocals (const char* Opt, const char* Arg) +static void OptStaticLocals (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Place local variables in static storage */ { CmdAddArg (&CC65, "-Cl"); @@ -774,7 +784,7 @@ static void OptStaticLocals (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 */ { Target = FindTarget (Arg); @@ -785,7 +795,8 @@ static void OptTarget (const char* Opt, const char* Arg) -static void OptVerbose (const char* Opt, const char* Arg) +static void OptVerbose (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Verbose mode (compiler, assembler, linker) */ { CmdAddArg (&CC65, "-v"); @@ -795,7 +806,8 @@ static void OptVerbose (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 version number */ { fprintf (stderr, diff --git a/src/cl65/make/gcc.mak b/src/cl65/make/gcc.mak index 3f10c479b..111e07683 100644 --- a/src/cl65/make/gcc.mak +++ b/src/cl65/make/gcc.mak @@ -6,7 +6,7 @@ COMMON = ../common CC=gcc -CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON) +CFLAGS = -O2 -g -Wall -W -I$(COMMON) EBIND = emxbind LDFLAGS= diff --git a/src/cl65/spawn.c b/src/cl65/spawn.c index 8a43087c3..19e0aebd3 100644 --- a/src/cl65/spawn.c +++ b/src/cl65/spawn.c @@ -38,18 +38,22 @@ #include #include #include + +/* common */ +#include "attrib.h" +/* cl65 */ #include "error.h" /*****************************************************************************/ -/* Code */ +/* Code */ /*****************************************************************************/ -int spawnvp (int Mode, const char* File, char* const argv []) +int spawnvp (int Mode attribute ((unused)), const char* File, char* const argv []) /* Execute the given program searching and wait til it terminates. The Mode * argument is ignored (compatibility only). The result of the function is * the return code of the program. The function will terminate the program diff --git a/src/da65/handler.c b/src/da65/handler.c index e041d69e6..eee8a12bb 100644 --- a/src/da65/handler.c +++ b/src/da65/handler.c @@ -238,14 +238,14 @@ void OH_AbsoluteY (const OpcDesc* D) -void OH_AbsoluteLong (const OpcDesc* D) +void OH_AbsoluteLong (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_AbsoluteLongX (const OpcDesc* D) +void OH_AbsoluteLongX (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } @@ -269,7 +269,7 @@ void OH_Relative (const OpcDesc* D) -void OH_RelativeLong (const OpcDesc* D) +void OH_RelativeLong (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } @@ -332,49 +332,49 @@ void OH_AbsoluteIndirect (const OpcDesc* D) -void OH_StackRelative (const OpcDesc* D) +void OH_StackRelative (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_DirectIndirectLongX (const OpcDesc* D) +void OH_DirectIndirectLongX (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_StackRelativeIndirectY (const OpcDesc* D) +void OH_StackRelativeIndirectY (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_DirectIndirectLong (const OpcDesc* D) +void OH_DirectIndirectLong (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_DirectIndirectLongY (const OpcDesc* D) +void OH_DirectIndirectLongY (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_BlockMove (const OpcDesc* D) +void OH_BlockMove (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } -void OH_AbsoluteXIndirect (const OpcDesc* D) +void OH_AbsoluteXIndirect (const OpcDesc* D attribute ((unused))) { Error ("Not implemented"); } @@ -405,4 +405,3 @@ void OH_JmpAbsoluteIndirect (const OpcDesc* D) - diff --git a/src/da65/main.c b/src/da65/main.c index c321074f4..fcb1ccfce 100644 --- a/src/da65/main.c +++ b/src/da65/main.c @@ -143,7 +143,8 @@ static void OptCPU (const char* Opt, const char* Arg) -static void OptFormFeeds (const char* Opt, const char* Arg) +static void OptFormFeeds (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Add form feeds to the output */ { FormFeeds = 1; @@ -151,7 +152,8 @@ static void OptFormFeeds (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 (); @@ -160,14 +162,10 @@ static void OptHelp (const char* Opt, const char* Arg) -static void OptPageLength (const char* Opt, const char* Arg) +static void OptPageLength (const char* Opt attribute ((unused)), const char* Arg) /* Handle the --pagelength option */ { - int Len; - if (Arg == 0) { - NeedArg (Opt); - } - Len = atoi (Arg); + int Len = atoi (Arg); if (Len != 0 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) { AbEnd ("Invalid page length: %d", Len); } @@ -184,7 +182,8 @@ static void OptStartAddr (const char* Opt, const char* Arg) -static void OptVerbose (const char* Opt, const char* Arg) +static void OptVerbose (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Increase verbosity */ { ++Verbosity; @@ -192,7 +191,8 @@ static void OptVerbose (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 disassembler version */ { fprintf (stderr, @@ -257,7 +257,7 @@ static void OneOpcode (unsigned RemainingBytes) case atDWordTab: DWordTable (); - break; + break; case atAddrTab: AddrTable (); diff --git a/src/da65/make/gcc.mak b/src/da65/make/gcc.mak index fa6c4a1e5..348c5e391 100644 --- a/src/da65/make/gcc.mak +++ b/src/da65/make/gcc.mak @@ -5,7 +5,7 @@ # Library dir COMMON = ../common -CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON) +CFLAGS = -g -O2 -Wall -W -I$(COMMON) CC=gcc EBIND=emxbind LDFLAGS= diff --git a/src/od65/main.c b/src/od65/main.c index f6d184063..0c9e22148 100644 --- a/src/od65/main.c +++ b/src/od65/main.c @@ -93,7 +93,8 @@ static void Usage (void) -static void OptDumpAll (const char* Opt, const char* Arg) +static void OptDumpAll (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump all object file information */ { What |= D_ALL; @@ -101,7 +102,8 @@ static void OptDumpAll (const char* Opt, const char* Arg) -static void OptDumpDbgSyms (const char* Opt, const char* Arg) +static void OptDumpDbgSyms (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump debug symbols contained in the object file */ { What |= D_DBGSYMS; @@ -109,7 +111,8 @@ static void OptDumpDbgSyms (const char* Opt, const char* Arg) -static void OptDumpExports (const char* Opt, const char* Arg) +static void OptDumpExports (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the exported symbols */ { What |= D_EXPORTS; @@ -117,7 +120,8 @@ static void OptDumpExports (const char* Opt, const char* Arg) -static void OptDumpFiles (const char* Opt, const char* Arg) +static void OptDumpFiles (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the source files */ { What |= D_FILES; @@ -125,7 +129,8 @@ static void OptDumpFiles (const char* Opt, const char* Arg) -static void OptDumpHeader (const char* Opt, const char* Arg) +static void OptDumpHeader (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the object file header */ { What |= D_HEADER; @@ -133,7 +138,8 @@ static void OptDumpHeader (const char* Opt, const char* Arg) -static void OptDumpImports (const char* Opt, const char* Arg) +static void OptDumpImports (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the imported symbols */ { What |= D_IMPORTS; @@ -141,7 +147,8 @@ static void OptDumpImports (const char* Opt, const char* Arg) -static void OptDumpLineInfo (const char* Opt, const char* Arg) +static void OptDumpLineInfo (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the line infos */ { What |= D_LINEINFO; @@ -149,7 +156,8 @@ static void OptDumpLineInfo (const char* Opt, const char* Arg) -static void OptDumpOptions (const char* Opt, const char* Arg) +static void OptDumpOptions (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the object file options */ { What |= D_OPTIONS; @@ -157,7 +165,8 @@ static void OptDumpOptions (const char* Opt, const char* Arg) -static void OptDumpSegments (const char* Opt, const char* Arg) +static void OptDumpSegments (const char* Opt attribute ((unused)), + const char* Arg attribute ((unused))) /* Dump the segments in the object file */ { What |= D_SEGMENTS; @@ -165,7 +174,8 @@ static void OptDumpSegments (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 (); @@ -174,7 +184,8 @@ static void OptHelp (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, diff --git a/src/od65/make/gcc.mak b/src/od65/make/gcc.mak index 616b82423..5642308ac 100644 --- a/src/od65/make/gcc.mak +++ b/src/od65/make/gcc.mak @@ -6,7 +6,7 @@ # Library dir COMMON = ../common -CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON) +CFLAGS = -O2 -g -Wall -W -I$(COMMON) CC=gcc EBIND=emxbind LDFLAGS= -- 2.39.5