summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCyrill Gorcunov <gorcunov@gmail.com>2014-12-20 11:40:36 +0300
committerCyrill Gorcunov <gorcunov@gmail.com>2014-12-20 11:40:36 +0300
commit1006a47fe82acd82db9f52617060b373223ebcf3 (patch)
treeb2f5e6e113bea226601ce00e864449bfd0a886f7
parent7729edf7224e39628bd342c3a3bb44c1753bdfb0 (diff)
downloadnasm-1006a47fe82acd82db9f52617060b373223ebcf3.tar.gz
disasm: Add explicit type conversion to placate compiler
Otherwise getting | disasm.c:200:26: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] | return GET_REGISTER(nasm_rd_bndreg, regval); Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
-rw-r--r--disasm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/disasm.c b/disasm.c
index 161868d0..5e3a5e5c 100644
--- a/disasm.c
+++ b/disasm.c
@@ -159,7 +159,7 @@ static enum reg_enum whichreg(opflags_t regflags, int regval, int rex)
return 0;
#define GET_REGISTER(__array, __index) \
- ((__index) < ARRAY_SIZE(__array) ? __array[(__index)] : 0)
+ ((size_t)(__index) < (size_t)ARRAY_SIZE(__array) ? __array[(__index)] : 0)
if (!(REG8 & ~regflags)) {
if (rex & (REX_P|REX_NH))