mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-01-18 16:25:05 +08:00
compiler.h: add redundant cast to quiet Watcom warning
Add a redundant cast in watcom_switch_hack() to quiet a Watcom warning, and remove open-coded implementation of the Watcom switch hack. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
This commit is contained in:
parent
e29c7bb241
commit
e90a89abe4
@ -259,7 +259,7 @@ size_t strnlen(const char *s, size_t maxlen);
|
||||
|
||||
static inline unsigned int watcom_switch_hack(uint64_t x)
|
||||
{
|
||||
if (x > UINT_MAX)
|
||||
if (x > (uint64_t)UINT_MAX)
|
||||
return BOGUS_CASE;
|
||||
else
|
||||
return (unsigned int)x;
|
||||
|
@ -1140,10 +1140,7 @@ static void obj_out(int32_t segto, const void *data,
|
||||
ldata += size;
|
||||
}
|
||||
|
||||
if (size > UINT_MAX)
|
||||
size = 0;
|
||||
|
||||
switch ((unsigned int)size) {
|
||||
switch (size) {
|
||||
default:
|
||||
nasm_error(ERR_NONFATAL, "OBJ format can only handle 16- or "
|
||||
"32-byte relocations");
|
||||
|
Loading…
Reference in New Issue
Block a user