mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-03-19 18:00:23 +08:00
Clean up remaining build warnings
Clean up remaining build warnings. None of this should affect code operations. The only warnings which were actually relevant might have been the ones in ldrdf.c, but it's not clear if anyone ever uses that.
This commit is contained in:
parent
a30cc07224
commit
682221438e
@ -1995,7 +1995,7 @@ static void obj_write_file(int debuginfo)
|
||||
orp->parm[0] = 0;
|
||||
orp->parm[1] = 0;
|
||||
for (pub = fpubhead; pub; pub = pub->next) { /* pub-crawl :-) */
|
||||
if ((uint64_t)orp->parm[2] != pub->segment) {
|
||||
if (orp->parm[2] != (uint32_t)pub->segment) {
|
||||
obj_emit(orp);
|
||||
orp->parm[2] = pub->segment;
|
||||
}
|
||||
|
7
parser.c
7
parser.c
@ -802,6 +802,7 @@ restart_parse:
|
||||
}
|
||||
}
|
||||
} else { /* it's a register */
|
||||
unsigned int rs;
|
||||
|
||||
if (value->type >= EXPR_SIMPLE || value->value != 1) {
|
||||
error(ERR_NONFATAL, "invalid operand type");
|
||||
@ -825,16 +826,16 @@ restart_parse:
|
||||
* we want to produce a warning iff the specified size
|
||||
* is different from the register size
|
||||
*/
|
||||
i = result->oprs[operand].type & SIZE_MASK;
|
||||
rs = result->oprs[operand].type & SIZE_MASK;
|
||||
} else
|
||||
i = 0;
|
||||
rs = 0;
|
||||
|
||||
result->oprs[operand].type &= TO;
|
||||
result->oprs[operand].type |= REGISTER;
|
||||
result->oprs[operand].type |= reg_flags[value->type];
|
||||
result->oprs[operand].basereg = value->type;
|
||||
|
||||
if (i && (result->oprs[operand].type & SIZE_MASK) != i)
|
||||
if (rs && (result->oprs[operand].type & SIZE_MASK) != rs)
|
||||
error(ERR_WARNING | ERR_PASS1,
|
||||
"register size specification ignored");
|
||||
}
|
||||
|
@ -218,6 +218,8 @@ void processmodule(const char *filename, struct modulenode *mod)
|
||||
int32_t bssamount = 0;
|
||||
int bss_was_referenced = 0;
|
||||
|
||||
memset(&sconf, 0, sizeof sconf);
|
||||
|
||||
for (seg = 0; seg < mod->f.nsegs; seg++) {
|
||||
/*
|
||||
* get the segment configuration for this type from the segment
|
||||
@ -720,7 +722,7 @@ void write_output(const char *filename)
|
||||
}
|
||||
i = fread(hr->g.data, 1, sizeof(hr->g.data), ff);
|
||||
fseek(ff, 0, SEEK_END);
|
||||
if (ftell(ff) > sizeof(hr->g.data)) {
|
||||
if (ftell(ff) > (long)sizeof(hr->g.data)) {
|
||||
fprintf(error_file,
|
||||
"warning: maximum generic record size is %u, "
|
||||
"rest of file ignored\n",
|
||||
|
Loading…
x
Reference in New Issue
Block a user