From cbdde82aca1103db1ed69f29a666f29fdc6b79ba Mon Sep 17 00:00:00 2001 From: Pau Espin Pedrol Date: Fri, 15 Sep 2017 19:25:52 +0200 Subject: bind_receiver_resp_test.c: Fix compilation warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit /home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c: In function ‘main’: /home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c:55:58: warning: ‘snprintf’ output truncated before the last format character [-Wformat-truncation=] snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456"); ^ /home/pespin/dev/sysmocom/bin/../git/libsmpp34/test_pdu/bind_receiver_resp_test.c:55:5: note: ‘snprintf’ output 17 bytes into a destination of size 16 snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456"); Change-Id: I4ec682a5e2ee4d02008a9c86a0a5507792667d0e --- test_pdu/bind_receiver_resp_test.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test_pdu/bind_receiver_resp_test.c b/test_pdu/bind_receiver_resp_test.c index 610effd..e1817e8 100644 --- a/test_pdu/bind_receiver_resp_test.c +++ b/test_pdu/bind_receiver_resp_test.c @@ -52,7 +52,7 @@ main( int argc, char *argv[] ) b.command_id = BIND_RECEIVER_RESP; b.command_status = ESME_ROK; b.sequence_number = 1; - snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "1234567890123456"); + snprintf((char*)b.system_id, sizeof(b.system_id), "%s", "123456789012345"); tlv.tag = TLVID_sc_interface_version; tlv.length = sizeof(uint8_t); -- cgit v1.2.3