summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-11-13 09:49:51 -0800
committerH. Peter Anvin <hpa@zytor.com>2007-11-13 09:49:51 -0800
commit4095197f6c64b837684b35badf7f271545fa76f1 (patch)
tree048e5373d1fe0974c994255ba055ab0262667303
parentd13f30e08fb35ccc5afdebad87851637733ade1e (diff)
downloadnasm-4095197f6c64b837684b35badf7f271545fa76f1.tar.gz
Cast 64-bit switch expressions to (int) to keep OpenWatcom happy
Our size arguments are 64-bit values, but we don't need that range for anywhere where we need a switch. OpenWatcom can't deal with them (sigh), so cast them to (int) for now.
-rw-r--r--output/outelf64.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/output/outelf64.c b/output/outelf64.c
index dcf3def6..f1273480 100644
--- a/output/outelf64.c
+++ b/output/outelf64.c
@@ -868,7 +868,7 @@ static void elf_out(int32_t segto, const void *data,
" segment base references");
} else {
if (wrt == NO_SEG) {
- switch (size) {
+ switch ((int)size) {
case 2:
elf_add_reloc(s, segment, R_X86_64_16);
break;
@@ -896,7 +896,7 @@ static void elf_out(int32_t segto, const void *data,
addr = elf_add_gsym_reloc(s, segment, addr,
R_X86_64_GOT32, true);
} else if (wrt == elf_sym_sect + 1) {
- switch (size) {
+ switch ((int)size) {
case 2:
gnu16 = true;
addr = elf_add_gsym_reloc(s, segment, addr,