0
0
mirror of https://github.com/netwide-assembler/nasm.git synced 2025-07-24 10:25:42 -04:00

Placated unreferenced types.

This commit is contained in:
Keith Kanios 2007-04-14 00:46:25 +00:00
parent 93f2e9a5a1
commit c7ae18dba1
9 changed files with 87 additions and 1 deletions

1
nasm.c
View File

@ -1661,6 +1661,7 @@ static char *no_pp_getline(void)
static void no_pp_cleanup(int pass)
{
(void)pass; /* placate GCC */
fclose(no_pp_fp);
}

View File

@ -1117,22 +1117,39 @@ char *nasm_strcat(char *one, char *two)
void null_debug_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
(void)fp;
(void)error;
}
void null_debug_linenum(const char *filename, int32_t linenumber, int32_t segto)
{
(void)filename;
(void)linenumber;
(void)segto;
}
void null_debug_deflabel(char *name, int32_t segment, int32_t offset,
int is_global, char *special)
{
(void)name;
(void)segment;
(void)offset;
(void)is_global;
(void)special;
}
void null_debug_routine(const char *directive, const char *params)
{
(void)directive;
(void)params;
}
void null_debug_typevalue(int32_t type)
{
(void)type;
}
void null_debug_output(int type, void *param)
{
(void)type;
(void)param;
}
void null_debug_cleanup(void)
{

View File

@ -220,6 +220,9 @@ static void aout_cleanup(int debuginfo)
static int32_t aout_section_names(char *name, int pass, int *bits)
{
(void)pass;
/*
* Default to 32 bits.
*/
@ -888,6 +891,9 @@ static int32_t aout_segbase(int32_t segment)
static int aout_directive(char *directive, char *value, int pass)
{
(void)directive;
(void)value;
(void)pass;
return 0;
}
@ -905,6 +911,8 @@ static const char *aout_stdmac[] = {
static int aout_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}
#endif /* OF_AOUT || OF_AOUTB */

View File

@ -87,6 +87,7 @@ static void as86_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval)
as86fp = fp;
error = errfunc;
(void)ldef; /* placate optimisers */
(void)eval;
stext.data = saa_init(1L);
stext.datalen = 0L;
stext.head = stext.last = NULL;
@ -137,6 +138,9 @@ static void as86_cleanup(int debuginfo)
static int32_t as86_section_names(char *name, int pass, int *bits)
{
(void)pass;
/*
* Default is 16 bits.
*/
@ -578,6 +582,9 @@ static int32_t as86_segbase(int32_t segment)
static int as86_directive(char *directive, char *value, int pass)
{
(void)directive;
(void)value;
(void)pass;
return 0;
}
@ -603,11 +610,18 @@ static const char *as86_stdmac[] = {
static int as86_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}
void as86_linenumber(char *name, int32_t segment, int32_t offset, int is_main,
int lineno)
{
(void)name;
(void)segment;
(void)offset;
(void)is_main;
(void)lineno;
}
struct ofmt of_as86 = {
"Linux as86 (bin86 version 0.3) object files",

View File

@ -205,6 +205,7 @@ static struct Section *create_section(char *name)
static void bin_cleanup(int debuginfo)
{
(void)debuginfo; /* placate optimizers */
struct Section *g, **gp;
struct Section *gs = NULL, **gsp;
struct Section *s, **sp;
@ -1384,6 +1385,8 @@ static int32_t bin_segbase(int32_t segment)
static int bin_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}

View File

@ -135,6 +135,7 @@ static void coff_win32_init(FILE * fp, efunc errfunc,
{
win32 = TRUE; win64 = FALSE;
(void)ldef; /* placate optimizers */
(void)eval;
coff_gen_init(fp, errfunc);
}
@ -144,6 +145,7 @@ static void coff_win64_init(FILE * fp, efunc errfunc,
maxbits = 64;
win32 = FALSE; win64 = TRUE;
(void)ldef; /* placate optimizers */
(void)eval;
coff_gen_init(fp, errfunc);
}
@ -152,6 +154,7 @@ static void coff_std_init(FILE * fp, efunc errfunc, ldfunc ldef,
{
win32 = win64 = FALSE;
(void)ldef; /* placate optimizers */
(void)eval;
coff_gen_init(fp, errfunc);
}
@ -414,6 +417,8 @@ static int32_t coff_add_reloc(struct Section *sect, int32_t segment,
{
struct Reloc *r;
(void)size64;
r = *sect->tail = nasm_malloc(sizeof(struct Reloc));
sect->tail = &r->next;
r->next = NULL;
@ -886,6 +891,8 @@ static const char *coff_stdmac[] = {
static int coff_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}
#endif /* defined(OF_COFF) || defined(OF_WIN32) */

View File

@ -1230,6 +1230,9 @@ static int32_t elf_segbase(int32_t segment)
static int elf_directive(char *directive, char *value, int pass)
{
(void)directive;
(void)value;
(void)pass;
return 0;
}
@ -1248,6 +1251,8 @@ static const char *elf_stdmac[] = {
};
static int elf_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}
@ -1287,10 +1292,16 @@ struct ofmt of_elf = {
void stabs_init(struct ofmt *of, void *id, FILE * fp, efunc error)
{
(void)of;
(void)id;
(void)fp;
(void)error;
}
void stabs_linenum(const char *filename, int32_t linenumber, int32_t segto)
{
(void)segto;
if (!stabs_filename) {
stabs_filename = (char *)nasm_malloc(strlen(filename) + 1);
strcpy(stabs_filename, filename);
@ -1313,14 +1324,22 @@ void stabs_linenum(const char *filename, int32_t linenumber, int32_t segto)
void stabs_deflabel(char *name, int32_t segment, int32_t offset, int is_global,
char *special)
{
(void)name;
(void)segment;
(void)offset;
(void)is_global;
(void)special;
}
void stabs_directive(const char *directive, const char *params)
{
(void)directive;
(void)params;
}
void stabs_typevalue(int32_t type)
{
(void)type;
}
void stabs_output(int type, void *param)

View File

@ -88,7 +88,7 @@ static struct sectmap {
".data", "__DATA", "__data", S_REGULAR}, {
".rodata", "__DATA", "__const", S_REGULAR}, {
".bss", "__DATA", "__bss", S_ZEROFILL}, {
NULL, NULL, NULL}};
NULL, NULL, NULL, NULL}};
struct reloc {
/* nasm internal data */
@ -324,6 +324,8 @@ static void macho_init(FILE * fp, efunc errfunc, ldfunc ldef,
static int macho_setinfo(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}
@ -519,6 +521,9 @@ static void macho_output(int32_t secto, const void *data, uint32_t type,
static int32_t macho_section(char *name, int pass, int *bits)
{
(void)pass;
int32_t index, originalIndex;
char *sectionAttributes;
struct sectmap *sm;
@ -703,6 +708,9 @@ static int32_t macho_segbase(int32_t section)
static int macho_directive(char *directive, char *value, int pass)
{
(void)directive;
(void)value;
(void)pass;
return 0;
}

View File

@ -84,6 +84,10 @@ static int32_t headerlength;
static void rdf2_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval)
{
(void)ldef;
(void)eval;
int segtext, segdata, segbss;
/* set up the initial segments */
@ -129,6 +133,9 @@ static void rdf2_init(FILE * fp, efunc errfunc, ldfunc ldef, evalfunc eval)
static int32_t rdf2_section_names(char *name, int pass, int *bits)
{
(void)pass;
int i;
char *p, *q;
int code = -1;
@ -759,6 +766,8 @@ static const char *rdf2_stdmac[] = {
static int rdf2_set_info(enum geninfo type, char **val)
{
(void)type;
(void)val;
return 0;
}