From 68d9c5a468ea6eca354cb7ece914e48c028257e3 Mon Sep 17 00:00:00 2001 From: Alexander Couzens Date: Fri, 2 Oct 2020 00:13:42 +0200 Subject: gtphub_test: fix compilation error on gcc 10.2.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- tests/gtphub/gtphub_test.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/gtphub/gtphub_test.c b/tests/gtphub/gtphub_test.c index d381b9b86..dab39775b 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" -- cgit v1.2.3