mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-12-17 21:26:13 -07:00
linux-user: Export use is_error(), use it to avoid warnings
This fixes:
linux-user/flatload.c:740:9: warning: Loss of sign in implicit conversion
if (res > (unsigned long)-4096)
^~~
Reported-by: Clang Static Analyzer
Signed-off-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Laurent Vivier <laurent@vivier.eu>
Message-Id: <20180604153722.24956-2-f4bug@amsat.org>
Signed-off-by: Laurent Vivier <laurent@vivier.eu>
This commit is contained in:
parent
9f55925b8f
commit
1129dd7121
2 changed files with 5 additions and 5 deletions
|
|
@ -618,6 +618,11 @@ static inline void *lock_user_string(abi_ulong guest_addr)
|
|||
|
||||
#include <pthread.h>
|
||||
|
||||
static inline int is_error(abi_long ret)
|
||||
{
|
||||
return (abi_ulong)ret >= (abi_ulong)(-4096);
|
||||
}
|
||||
|
||||
/* Include target-specific struct and function definitions;
|
||||
* they may need access to the target-independent structures
|
||||
* above, so include them last.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue