aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2020-10-12 17:44:09 +0200
committerneels <nhofmeyr@sysmocom.de>2020-10-15 01:02:04 +0000
commit9faeacd6a15a49820b76995eeb33162e4d91adb0 (patch)
tree835081bff7ba963921c65c894ef7e9cdc9eebd4e
parent3c5fa2df44b53dc04b2697cd45cd6ac718818834 (diff)
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
-rw-r--r--src/gsm/gad.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/gsm/gad.c b/src/gsm/gad.c
index 3ec28f98..f7ee48a6 100644
--- a/src/gsm/gad.c
+++ b/src/gsm/gad.c
@@ -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; \