bitdefender / bddisasm

bddisasm is a fast, lightweight, x86/x64 instruction decoder. The project also features a fast, basic, x86/x64 instruction emulator, designed specifically to detect shellcode-like behavior.
Apache License 2.0
888 stars 115 forks source link

fix gcc warning in NdFetchData #95

Closed BJNFNE closed 3 months ago

BJNFNE commented 3 months ago

this PR fixes this compiler warning: bddisasm_crt.c bdx86_decoder.c bdx86_decoder.c: In function ‘NdFetchData’: bdx86_decoder.c:104:12: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare] 104 | (2 == Size) ? ND_FETCH_16(Buffer) : | ^~~~~~~~~~~ 105 | 0; | ~ bdx86_formatter.c bdx86_helpers.c Disasm library in ../bin/x64/Debug/libbddisasm.a bddisasm_crt.c bdx86_decoder.c bdx86_decoder.c: In function ‘NdFetchData’: bdx86_decoder.c:104:12: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘long unsigned int’ due to unsignedness of other operand [-Wsign-compare] 104 | (2 == Size) ? ND_FETCH_16(Buffer) : | ^~~~~~~~~~~ 105 | 0; | ~ bdx86_formatter.c bdx86_helpers.c Disasm library in ../bin/x64/Release/libbddisasm.a bdshemu.c bdshemu_x86.c Shemu library in ../bin/x64/Debug/libbdshemu.a bdshemu.c bdshemu_x86.c Shemu library in ../bin/x64/Release/libbdshemu.a