aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Couzens <lynxis@fe80.eu>2020-10-02 00:13:42 +0200
committerlaforge <laforge@osmocom.org>2020-10-02 20:44:34 +0000
commit68d9c5a468ea6eca354cb7ece914e48c028257e3 (patch)
treecbaebe2f507569c286a29b3f1d3e0d66a4a79bdf
parentef6205ba00f3197803c05265d9abd1c64c24507d (diff)
gtphub_test: fix compilation error on gcc 10.2.0
Ensure dump && hex can't be zero. gtphub_test.c: In function ‘_reply_is.constprop’: gtphub_test.c:535:3: error: ‘%s’ directive argument is null [-Werror=format-overflow=] Change-Id: Id27bf46855a228935fe706584f9b27cf3facf623
-rw-r--r--tests/gtphub/gtphub_test.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c
index d381b9b8..dab39775 100644
--- a/tests/gtphub/gtphub_test.c
+++ b/tests/gtphub/gtphub_test.c
@@ -529,6 +529,8 @@ static int _reply_is(const char *hex, const char *file, int line)
const char *dump = osmo_hexdump_nospc(reply_buf, len);
int cmp = strcmp(dump, hex);
+ OSMO_ASSERT(dump && hex);
+
if (cmp != 0) {
printf("\n%s:%d: reply_is(): MISMATCH\n"
" expecting:\n'%s'\n"