aboutsummaryrefslogtreecommitdiffstats
path: root/tests/mgcp/mgcp_patch_test.c
diff options
context:
space:
mode:
authorHolger Hans Peter Freyther <zecke@selfish.org>2013-03-11 17:19:18 +0100
committerHolger Hans Peter Freyther <zecke@selfish.org>2013-03-18 19:03:44 +0100
commitd93c84f96e7b7e652ac5a937c1f27df0913fca18 (patch)
tree4c91465c51b135410dcda6f4d76a12f6ba43e426 /tests/mgcp/mgcp_patch_test.c
parente6caed12caa117de4d28111d9302d542963b1836 (diff)
misc: Address warnings coming from clang
* Include stdlib.h before the snmp headers to have a free declaration * Use sprintf(dest, "%s", str) to avoid format string attacks * Avoid bogus assignment. This pattern was used for marking something as unused in the past.
Diffstat (limited to 'tests/mgcp/mgcp_patch_test.c')
-rw-r--r--tests/mgcp/mgcp_patch_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/mgcp/mgcp_patch_test.c b/tests/mgcp/mgcp_patch_test.c
index 68d163d..3153ecd 100644
--- a/tests/mgcp/mgcp_patch_test.c
+++ b/tests/mgcp/mgcp_patch_test.c
@@ -197,7 +197,7 @@ static struct msgb *create_msg(const char *str)
struct msgb *msg;
msg = msgb_alloc_headroom(4096, 128, "MGCP msg");
- int len = sprintf((char *)msg->data, str);
+ int len = sprintf((char *)msg->data, "%s", str);
msg->l2h = msgb_put(msg, len);
return msg;
}