mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-24 19:00:23 +08:00
Suppress a few signedness warnings
This commit is contained in:
parent
2674b04d88
commit
192d5b5e9c
@ -378,7 +378,7 @@ int32_t assemble(int32_t segment, int32_t offset, int bits, uint32_t cp,
|
||||
l = len;
|
||||
while (l > 0) {
|
||||
int32_t m =
|
||||
fread(buf, 1, (l > sizeof(buf) ? sizeof(buf) : l),
|
||||
fread(buf, 1, (l > (int32_t) sizeof(buf) ? (int32_t) sizeof(buf) : l),
|
||||
fp);
|
||||
if (!m) {
|
||||
/*
|
||||
|
2
nasm.c
2
nasm.c
@ -698,7 +698,7 @@ static void process_respfile(FILE * rfile)
|
||||
if (process_arg(prevarg, p))
|
||||
*p = '\0';
|
||||
|
||||
if (strlen(p) > prevargsize - 10) {
|
||||
if ((int) strlen(p) > prevargsize - 10) {
|
||||
prevargsize += ARG_BUF_DELTA;
|
||||
prevarg = nasm_realloc(prevarg, prevargsize);
|
||||
}
|
||||
|
@ -1273,9 +1273,9 @@ smacro_defined(Context * ctx, char *name, int nparam, SMacro ** defn,
|
||||
|
||||
while (m) {
|
||||
if (!mstrcmp(m->name, name, m->casesense && nocase) &&
|
||||
(nparam <= 0 || m->nparam == 0 || nparam == m->nparam)) {
|
||||
(nparam <= 0 || m->nparam == 0 || nparam == (int) m->nparam)) {
|
||||
if (defn) {
|
||||
if (nparam == m->nparam || nparam == -1)
|
||||
if (nparam == (int) m->nparam || nparam == -1)
|
||||
*defn = m;
|
||||
else
|
||||
*defn = NULL;
|
||||
@ -2579,7 +2579,7 @@ static int do_directive(Token * tline)
|
||||
macro_start->next = NULL;
|
||||
macro_start->text = nasm_strdup("'''");
|
||||
if (evalresult->value > 0
|
||||
&& evalresult->value < strlen(t->text) - 1) {
|
||||
&& evalresult->value < (int) strlen(t->text) - 1) {
|
||||
macro_start->text[1] = t->text[evalresult->value];
|
||||
} else {
|
||||
macro_start->text[2] = '\0';
|
||||
|
Loading…
x
Reference in New Issue
Block a user