aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-19 15:47:36 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2019-08-19 15:47:36 -0700
commit41e970505448a82b672b1449de2ff50dfbd55395 (patch)
treefe23631b57e8de064723e2f4b6b1c6af5a20c85b
parentb83621350cd69649782426ebcfa4c0f26f9aa939 (diff)
downloadnasm-41e970505448a82b672b1449de2ff50dfbd55395.tar.gz
nasm-41e970505448a82b672b1449de2ff50dfbd55395.tar.xz
nasm-41e970505448a82b672b1449de2ff50dfbd55395.zip
assemble.c: fix signed/unsigned comparison warning
Ponderance: if data->bits < globalbits, should we actually use OUT_UNSIGNED rather than OUT_WRAP here? Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-rw-r--r--asm/assemble.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/asm/assemble.c b/asm/assemble.c
index 2394e765..a3752b47 100644
--- a/asm/assemble.c
+++ b/asm/assemble.c
@@ -376,7 +376,7 @@ static void out(struct out_data *data)
amax = ofmt->maxbits >> 3; /* Maximum address size in bytes */
if ((ofmt->flags & OFMT_KEEP_ADDR) == 0 && data->tsegment == fixseg &&
data->twrt == NO_SEG) {
- if (asize < (data->bits >> 3))
+ if (asize < (size_t)(data->bits >> 3))
warn_overflow_out(addrval, asize, data->sign);
xdata.q = cpu_to_le64(addrval);
data->data = xdata.b;