From 9faeacd6a15a49820b76995eeb33162e4d91adb0 Mon Sep 17 00:00:00 2001 From: Neels Hofmeyr Date: Mon, 12 Oct 2020 17:44:09 +0200 Subject: 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 --- src/gsm/gad.c | 4 ++-- 1 file 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; \ -- cgit v1.2.3