Fix MSVC warning C4245: signed/unsigned mismatch in prototype matching

The type of the return value must match exactly the function prototype.
MSVC warning C4245: 'argument': conversion from 'int' to 'unsigned int', signed/unsigned mismatch
https://github.com/upx/upx/issues/435
	modified:   bele_policy.h
This commit is contained in:
John Reiser 2020-11-28 19:45:54 -08:00 committed by Markus F.X.J. Oberhumer
parent 1879185e42
commit ce6b5a0688

View File

@ -126,13 +126,13 @@ struct BEPolicy
{ set_be64(p, v); }
V unsigned get16_signed(const void *p) C
{ return get_be16_signed(p); }
{ return (unsigned)get_be16_signed(p); }
V unsigned get24_signed(const void *p) C
{ return get_be24_signed(p); }
{ return (unsigned)get_be24_signed(p); }
V unsigned get32_signed(const void *p) C
{ return get_be32_signed(p); }
{ return (unsigned)get_be32_signed(p); }
V upx_uint64_t get64_signed(const void *p) C
{ return get_be64_signed(p); }
{ return (upx_uint64_t)get_be64_signed(p); }
S u16_compare(const void *a, const void *b) C
{ return be16_compare(a, b); }
@ -203,13 +203,13 @@ struct LEPolicy
{ set_le64(p, v); }
V unsigned get16_signed(const void *p) C
{ return get_le16_signed(p); }
{ return (unsigned)get_le16_signed(p); }
V unsigned get24_signed(const void *p) C
{ return get_le24_signed(p); }
{ return (unsigned)get_le24_signed(p); }
V unsigned get32_signed(const void *p) C
{ return get_le32_signed(p); }
{ return (unsigned)get_le32_signed(p); }
V upx_uint64_t get64_signed(const void *p) C
{ return get_le64_signed(p); }
{ return (upx_uint64_t)get_le64_signed(p); }
S u16_compare(const void *a, const void *b) C
{ return le16_compare(a, b); }