Fix assorted sign-compare compilation warnings

Remove most warnings spotted by `gcc -Wsign-compare`
This commit is contained in:
Giovanni Bechis 2022-03-02 23:40:33 +01:00 committed by GitHub
parent 390c264480
commit b0de9b3923
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View file

@ -376,7 +376,7 @@ static const oid_alternative_t *asn1_expect_algo_multi(fmap_t *map, const void *
{
struct cli_asn1 obj;
unsigned int avail;
int i;
unsigned int i;
const oid_alternative_t *oid_alt_ptr = NULL;
if (asn1_expect_objtype(map, *asn1data, asn1len, &obj, ASN1_TYPE_SEQUENCE)) { /* SEQUENCE */
@ -2163,7 +2163,7 @@ int asn1_load_mscat(fmap_t *map, struct cl_engine *engine)
{
struct cli_asn1 c;
unsigned int size;
int i;
unsigned int i;
// TODO As currently implemented, loading in a .cat file with -d requires
// an accompanying .crb with trust entries that will cause the .cat

View file

@ -3282,7 +3282,7 @@ void cli_bytevalue_describe(const struct cli_bc *bc, unsigned funcid)
void cli_byteinst_describe(const struct cli_bc_inst *inst, unsigned *bbnum)
{
unsigned j;
size_t j;
char inst_str[256];
const struct cli_apicall *api;

View file

@ -180,7 +180,7 @@ int _yr_arena_make_relocatable(
base_offset = (uint8_t*) base - page->address;
offset = va_arg(offsets, size_t);
while (offset != -1)
while (offset != EOL)
{
assert(base_offset + offset <= page->used - sizeof(int64_t));
@ -337,7 +337,7 @@ void* yr_arena_base_address(
void* yr_arena_next_address(
YR_ARENA* arena,
void* address,
int offset)
size_t offset)
{
YR_ARENA_PAGE* page;

View file

@ -80,7 +80,7 @@ void* yr_arena_base_address(
void* yr_arena_next_address(
YR_ARENA* arena,
void* address,
int offset);
size_t offset);
int yr_arena_coalesce(