pahole: Fix signedness of ternary expression operator
To address this clang warning:
/var/home/acme/git/pahole/pahole.c: In function ‘type__instance_read_once’:
/var/home/acme/git/pahole/pahole.c:1933:78: warning: operand of ‘?:’ changes signedness from ‘int’ to ‘uint32_t’ {aka ‘unsigned int’} due to unsignedness of other operand [-Wsign-compare]
1933 | return fread(instance->instance, instance->type->size, 1, fp) != 1 ? -1 : instance->type->size;
Fixes: e3e5a4626c
("pahole: Make sure the header is read only once")
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
This commit is contained in:
parent
4e11c13895
commit
21b2933f01
2
pahole.c
2
pahole.c
|
@ -1931,7 +1931,7 @@ static int64_t type__instance_read_once(struct type_instance *instance, FILE *fp
|
|||
|
||||
instance->read_already = true;
|
||||
|
||||
return fread(instance->instance, instance->type->size, 1, fp) != 1 ? -1 : instance->type->size;
|
||||
return fread(instance->instance, instance->type->size, 1, fp) != 1 ? -1 : (int64_t)instance->type->size;
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
Loading…
Reference in New Issue