gad.c: try to workaround warning for "h.type >= 0"

The DEC_ERR() macro has a check for a missing type, but when used on the uint
h.type variable, emits a warning about an always-true statement. Try to work
around that warning with a cast to (int).

Related: CID#214888 CID#214890 CID#214891
Change-Id: Ic5fa87d23a6f0ce872de9c1dcfe36023981f70de
This commit is contained in:
Neels Hofmeyr 2020-10-12 17:44:09 +02:00 committed by neels
parent 3c5fa2df44
commit 9faeacd6a1
1 changed files with 2 additions and 2 deletions

View File

@ -252,8 +252,8 @@ static uint8_t osmo_gad_enc_ha_unc(uint32_t mm)
.rc = (RC), \
.type = (TYPE), \
.logmsg = talloc_asprintf(*err, "Error decoding GAD%s%s: " fmt, \
(TYPE) >= 0 ? " " : "", \
(TYPE) >= 0 ? osmo_gad_type_name(TYPE) : "", ##args), \
((int)(TYPE)) >= 0 ? " " : "", \
((int)(TYPE)) >= 0 ? osmo_gad_type_name(TYPE) : "", ##args), \
}; \
} \
return RC; \