diff options
author | Alexander Couzens <lynxis@fe80.eu> | 2020-10-02 00:13:42 +0200 |
---|---|---|
committer | laforge <laforge@osmocom.org> | 2020-10-02 20:44:34 +0000 |
commit | 68d9c5a468ea6eca354cb7ece914e48c028257e3 (patch) | |
tree | cbaebe2f507569c286a29b3f1d3e0d66a4a79bdf /tests | |
parent | ef6205ba00f3197803c05265d9abd1c64c24507d (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
Diffstat (limited to 'tests')
-rw-r--r-- | tests/gtphub/gtphub_test.c | 2 |
1 files changed, 2 insertions, 0 deletions
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" |