Use __attribute ((unused)) instead of -Wno-unused-parameter
git-svn-id: svn://svn.cc65.org/cc65/trunk@988 b7a2c559-68d2-44c3-8de9-860c34a00d81
This commit is contained in:
@@ -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 */
|
/* Compare function for the sort */
|
||||||
{
|
{
|
||||||
/* Cast the pointers */
|
/* Cast the pointers */
|
||||||
|
|||||||
@@ -758,7 +758,7 @@ void MacAbort (void)
|
|||||||
int IsMacro (const char* Name)
|
int IsMacro (const char* Name)
|
||||||
/* Return true if the given name is the name of a macro */
|
/* 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)
|
int IsDefine (const char* Name)
|
||||||
/* Return true if the given name is the name of a define style macro */
|
/* 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);
|
return (M != 0 && M->Style == MAC_STYLE_DEFINE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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 */
|
/* Mark unresolved symbols as imported */
|
||||||
{
|
{
|
||||||
AutoImport = 1;
|
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 */
|
/* Handle the --cpu option */
|
||||||
{
|
{
|
||||||
if (Arg == 0) {
|
|
||||||
NeedArg (Opt);
|
|
||||||
}
|
|
||||||
if (strcmp (Arg, "6502") == 0) {
|
if (strcmp (Arg, "6502") == 0) {
|
||||||
SetCPU (CPU_6502);
|
SetCPU (CPU_6502);
|
||||||
} else if (strcmp (Arg, "65C02") == 0) {
|
} 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 */
|
/* Add debug info to the object file */
|
||||||
{
|
{
|
||||||
DbgSyms = 1;
|
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 an emulation feature */
|
||||||
{
|
{
|
||||||
/* Set the feature, check for errors */
|
/* 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 */
|
/* Print usage information and exit */
|
||||||
{
|
{
|
||||||
Usage ();
|
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 */
|
/* Ignore case on symbols */
|
||||||
{
|
{
|
||||||
IgnoreCase = 1;
|
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 */
|
/* Add an include search path */
|
||||||
{
|
{
|
||||||
if (Arg == 0) {
|
|
||||||
NeedArg (Opt);
|
|
||||||
}
|
|
||||||
AddIncludePath (Arg);
|
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 */
|
/* Create a listing file */
|
||||||
{
|
{
|
||||||
Listing = 1;
|
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 */
|
/* Handle the --pagelength option */
|
||||||
{
|
{
|
||||||
int Len;
|
int Len = atoi (Arg);
|
||||||
if (Arg == 0) {
|
|
||||||
NeedArg (Opt);
|
|
||||||
}
|
|
||||||
Len = atoi (Arg);
|
|
||||||
if (Len != -1 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
|
if (Len != -1 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
|
||||||
AbEnd ("Invalid page length: %d", 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 */
|
/* Handle the -s/--smart options */
|
||||||
{
|
{
|
||||||
SmartMode = 1;
|
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 */
|
/* Set the target system */
|
||||||
{
|
{
|
||||||
if (Arg == 0) {
|
|
||||||
NeedArg (Opt);
|
|
||||||
}
|
|
||||||
|
|
||||||
/* Map the target name to a target id */
|
/* Map the target name to a target id */
|
||||||
Target = FindTarget (Arg);
|
Target = FindTarget (Arg);
|
||||||
if (Target == TGT_UNKNOWN) {
|
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 */
|
/* Increase verbosity */
|
||||||
{
|
{
|
||||||
++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 */
|
/* Print the assembler version */
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# Library dir
|
# Library dir
|
||||||
COMMON = ../common
|
COMMON = ../common
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON)
|
CFLAGS = -g -O2 -Wall -W -I$(COMMON)
|
||||||
CC = gcc
|
CC = gcc
|
||||||
EBIND = emxbind
|
EBIND = emxbind
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
|
|||||||
@@ -1023,13 +1023,14 @@ void SymDump (FILE* F)
|
|||||||
while (S) {
|
while (S) {
|
||||||
/* Ignore trampoline symbols */
|
/* Ignore trampoline symbols */
|
||||||
if ((S->Flags & SF_TRAMPOLINE) != 0) {
|
if ((S->Flags & SF_TRAMPOLINE) != 0) {
|
||||||
printf ("%-24s %s %s %s %s %s\n",
|
fprintf (F,
|
||||||
S->Name,
|
"%-24s %s %s %s %s %s\n",
|
||||||
(S->Flags & SF_DEFINED)? "DEF" : "---",
|
S->Name,
|
||||||
(S->Flags & SF_REFERENCED)? "REF" : "---",
|
(S->Flags & SF_DEFINED)? "DEF" : "---",
|
||||||
(S->Flags & SF_IMPORT)? "IMP" : "---",
|
(S->Flags & SF_REFERENCED)? "REF" : "---",
|
||||||
(S->Flags & SF_EXPORT)? "EXP" : "---",
|
(S->Flags & SF_IMPORT)? "IMP" : "---",
|
||||||
(S->Flags & SF_ZP)? "ZP" : "--");
|
(S->Flags & SF_EXPORT)? "EXP" : "---",
|
||||||
|
(S->Flags & SF_ZP)? "ZP" : "--");
|
||||||
}
|
}
|
||||||
/* Next symbol */
|
/* Next symbol */
|
||||||
S = S->List;
|
S = S->List;
|
||||||
|
|||||||
@@ -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 */
|
/* Strict source code as comments to the generated asm code */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-T");
|
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) */
|
/* Strict ANSI mode (compiler) */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-A");
|
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) */
|
/* Include directory (assembler) */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CA65, "-I");
|
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 */
|
/* Handle the --bss-name option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--bss-name");
|
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 */
|
/* Handle the --check-stack option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--check-stack");
|
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 */
|
/* Handle the --code-name option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--code-name");
|
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 */
|
/* Handle the --codesize option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--codesize");
|
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 */
|
/* Handle the --cpu option */
|
||||||
{
|
{
|
||||||
/* Add the cpu type to the assembler and compiler */
|
/* 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 */
|
/* Handle the --create-dep option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--create-dep");
|
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 */
|
/* Handle the --data-name option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--data-name");
|
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) */
|
/* Debug mode (compiler) */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-d");
|
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 */
|
/* Debug Info - add to compiler and assembler */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-g");
|
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 */
|
/* Emulation features for the assembler */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CA65, "--feature");
|
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 */
|
/* Print help - cl65 */
|
||||||
{
|
{
|
||||||
Usage ();
|
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) */
|
/* Include directory (compiler) */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-I");
|
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 */
|
/* Create an assembler listing */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CA65, "-l");
|
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 */
|
||||||
{
|
{
|
||||||
/* Create a map file (linker) */
|
/* 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 */
|
/* Handle the --rodata-name option */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "--rodata-name");
|
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 */
|
/* Make default characters signed */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-j");
|
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 */
|
/* Set the default start address */
|
||||||
{
|
{
|
||||||
CmdAddArg (&LD65, "-S");
|
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 */
|
/* Place local variables in static storage */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-Cl");
|
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 */
|
/* Set the target system */
|
||||||
{
|
{
|
||||||
Target = FindTarget (Arg);
|
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) */
|
/* Verbose mode (compiler, assembler, linker) */
|
||||||
{
|
{
|
||||||
CmdAddArg (&CC65, "-v");
|
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 */
|
/* Print version number */
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
COMMON = ../common
|
COMMON = ../common
|
||||||
|
|
||||||
CC=gcc
|
CC=gcc
|
||||||
CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON)
|
CFLAGS = -O2 -g -Wall -W -I$(COMMON)
|
||||||
EBIND = emxbind
|
EBIND = emxbind
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|
||||||
|
|||||||
@@ -39,17 +39,21 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
|
|
||||||
|
/* common */
|
||||||
|
#include "attrib.h"
|
||||||
|
|
||||||
|
/* cl65 */
|
||||||
#include "error.h"
|
#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
|
/* Execute the given program searching and wait til it terminates. The Mode
|
||||||
* argument is ignored (compatibility only). The result of the function is
|
* argument is ignored (compatibility only). The result of the function is
|
||||||
* the return code of the program. The function will terminate the program
|
* the return code of the program. The function will terminate the program
|
||||||
|
|||||||
@@ -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");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_AbsoluteLongX (const OpcDesc* D)
|
void OH_AbsoluteLongX (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
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");
|
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");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_DirectIndirectLongX (const OpcDesc* D)
|
void OH_DirectIndirectLongX (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_StackRelativeIndirectY (const OpcDesc* D)
|
void OH_StackRelativeIndirectY (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_DirectIndirectLong (const OpcDesc* D)
|
void OH_DirectIndirectLong (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_DirectIndirectLongY (const OpcDesc* D)
|
void OH_DirectIndirectLongY (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_BlockMove (const OpcDesc* D)
|
void OH_BlockMove (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
void OH_AbsoluteXIndirect (const OpcDesc* D)
|
void OH_AbsoluteXIndirect (const OpcDesc* D attribute ((unused)))
|
||||||
{
|
{
|
||||||
Error ("Not implemented");
|
Error ("Not implemented");
|
||||||
}
|
}
|
||||||
@@ -405,4 +405,3 @@ void OH_JmpAbsoluteIndirect (const OpcDesc* D)
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -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 */
|
/* Add form feeds to the output */
|
||||||
{
|
{
|
||||||
FormFeeds = 1;
|
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 */
|
/* Print usage information and exit */
|
||||||
{
|
{
|
||||||
Usage ();
|
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 */
|
/* Handle the --pagelength option */
|
||||||
{
|
{
|
||||||
int Len;
|
int Len = atoi (Arg);
|
||||||
if (Arg == 0) {
|
|
||||||
NeedArg (Opt);
|
|
||||||
}
|
|
||||||
Len = atoi (Arg);
|
|
||||||
if (Len != 0 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
|
if (Len != 0 && (Len < MIN_PAGE_LEN || Len > MAX_PAGE_LEN)) {
|
||||||
AbEnd ("Invalid page length: %d", 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 */
|
/* Increase verbosity */
|
||||||
{
|
{
|
||||||
++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 */
|
/* Print the disassembler version */
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
# Library dir
|
# Library dir
|
||||||
COMMON = ../common
|
COMMON = ../common
|
||||||
|
|
||||||
CFLAGS = -g -O2 -Wall -W -Wno-unused-parameter -I$(COMMON)
|
CFLAGS = -g -O2 -Wall -W -I$(COMMON)
|
||||||
CC=gcc
|
CC=gcc
|
||||||
EBIND=emxbind
|
EBIND=emxbind
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|||||||
@@ -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 */
|
/* Dump all object file information */
|
||||||
{
|
{
|
||||||
What |= D_ALL;
|
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 */
|
/* Dump debug symbols contained in the object file */
|
||||||
{
|
{
|
||||||
What |= D_DBGSYMS;
|
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 */
|
/* Dump the exported symbols */
|
||||||
{
|
{
|
||||||
What |= D_EXPORTS;
|
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 */
|
/* Dump the source files */
|
||||||
{
|
{
|
||||||
What |= D_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 */
|
/* Dump the object file header */
|
||||||
{
|
{
|
||||||
What |= D_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 */
|
/* Dump the imported symbols */
|
||||||
{
|
{
|
||||||
What |= D_IMPORTS;
|
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 */
|
/* Dump the line infos */
|
||||||
{
|
{
|
||||||
What |= D_LINEINFO;
|
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 */
|
/* Dump the object file options */
|
||||||
{
|
{
|
||||||
What |= D_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 */
|
/* Dump the segments in the object file */
|
||||||
{
|
{
|
||||||
What |= D_SEGMENTS;
|
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 */
|
/* Print usage information and exit */
|
||||||
{
|
{
|
||||||
Usage ();
|
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 */
|
/* Print the assembler version */
|
||||||
{
|
{
|
||||||
fprintf (stderr,
|
fprintf (stderr,
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
# Library dir
|
# Library dir
|
||||||
COMMON = ../common
|
COMMON = ../common
|
||||||
|
|
||||||
CFLAGS = -O2 -g -Wall -W -Wno-unused-parameter -I$(COMMON)
|
CFLAGS = -O2 -g -Wall -W -I$(COMMON)
|
||||||
CC=gcc
|
CC=gcc
|
||||||
EBIND=emxbind
|
EBIND=emxbind
|
||||||
LDFLAGS=
|
LDFLAGS=
|
||||||
|
|||||||
Reference in New Issue
Block a user