From d93c84f96e7b7e652ac5a937c1f27df0913fca18 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Mon, 11 Mar 2013 17:19:18 +0100 Subject: 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. --- tests/mgcp/mgcp_patch_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tests/mgcp/mgcp_patch_test.c') 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; } -- cgit v1.2.3