summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCharles Crayne <chuck@thor.crayne.org>2007-10-18 19:02:42 -0700
committerCharles Crayne <chuck@thor.crayne.org>2007-10-18 19:02:42 -0700
commit192d5b5e9cfc1a0991ce26fd61aed07d09d4f4f7 (patch)
treeedcfe8357328fd9bbe2773513dc055c1b6fecd7b
parent2674b04d8879fdcbcf81937a1da7375d351e7ef8 (diff)
downloadnasm-192d5b5e9cfc1a0991ce26fd61aed07d09d4f4f7.tar.gz
Suppress a few signedness warnings
-rw-r--r--assemble.c2
-rw-r--r--nasm.c2
-rw-r--r--preproc.c6
3 files changed, 5 insertions, 5 deletions
diff --git a/assemble.c b/assemble.c
index 5d9d1d00..b6cab12f 100644
--- a/assemble.c
+++ b/assemble.c
@@ -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) {
/*
diff --git a/nasm.c b/nasm.c
index af2f0b37..94985404 100644
--- a/nasm.c
+++ b/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);
}
diff --git a/preproc.c b/preproc.c
index 48e72071..d242faf7 100644
--- a/preproc.c
+++ b/preproc.c
@@ -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';