Clean up some enum sanity checks

It seems clang defaults to unsigned for enums. Interestingly, gcc was ok
with the checks being either way. I guess gcc treats enums that *can* be
unsigned as DWIM.
This commit is contained in:
Bill Currie 2022-03-31 00:16:29 +09:00
parent db01650dac
commit 63e5655f68
8 changed files with 11 additions and 12 deletions

View file

@ -564,7 +564,7 @@ PR_DebugSetSym (progs_t *pr, pr_debug_header_t *debug)
type_ptr += type->size) {
type = &G_STRUCT (pr, qfot_type_t, type_encodings + type_ptr);
if (type->meta == ty_basic
&& type->type >= 0 && type->type < ev_type_count) {
&& (unsigned) type->type < ev_type_count) {
res->type_encodings[type->type] = type;
}
}