From patchwork Fri Nov 6 19:59:50 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexander Huemer X-Patchwork-Id: 541106 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (unknown [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 182BA1413C4 for ; Sat, 7 Nov 2015 06:59:59 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id C3FA973B3; Fri, 6 Nov 2015 19:59:57 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from yade.xx.vu (yade.xx.vu [78.47.92.94]) by lists.osmocom.org (Postfix) with ESMTP id 688D8737D for ; Fri, 6 Nov 2015 19:59:56 +0000 (UTC) Received: from void.sbg.xx.vu (smtpout18.drei.com [109.126.64.18]) by yade.xx.vu (Postfix) with ESMTPSA id 1388823C622; Fri, 6 Nov 2015 20:59:55 +0100 (CET) From: Alexander Huemer To: openbsc@lists.osmocom.org Subject: [PATCH 1/2] fix some format specifiers Date: Fri, 6 Nov 2015 20:59:50 +0100 Message-Id: <1446839991-8820-2-git-send-email-alexander.huemer@xx.vu> X-Mailer: git-send-email 2.6.2 In-Reply-To: <1446839991-8820-1-git-send-email-alexander.huemer@xx.vu> References: <20151106194820.GC30339@yade.xx.vu> <1446839991-8820-1-git-send-email-alexander.huemer@xx.vu> X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Development of the OpenBSC GSM base station controller List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" --- src/common/msg_utils.c | 6 +++--- src/common/vty.c | 5 +++-- tests/agch/agch_test.c | 9 +++++---- 3 files changed, 11 insertions(+), 9 deletions(-) diff --git a/src/common/msg_utils.c b/src/common/msg_utils.c index 22a3012..841ffe6 100644 --- a/src/common/msg_utils.c +++ b/src/common/msg_utils.c @@ -96,7 +96,7 @@ int msg_verify_ipa_structure(struct msgb *msg) if (msgb_l1len(msg) < sizeof(struct ipaccess_head)) { LOGP(DL1C, LOGL_ERROR, - "Ipa header insufficient space %d %d\n", + "Ipa header insufficient space %d %zu\n", msgb_l1len(msg), sizeof(struct ipaccess_head)); return -1; } @@ -105,7 +105,7 @@ int msg_verify_ipa_structure(struct msgb *msg) if (ntohs(hh->len) != msgb_l1len(msg) - sizeof(struct ipaccess_head)) { LOGP(DL1C, LOGL_ERROR, - "Incorrect ipa header msg size %d %d\n", + "Incorrect ipa header msg size %d %zu\n", ntohs(hh->len), msgb_l1len(msg) - sizeof(struct ipaccess_head)); return -1; } @@ -142,7 +142,7 @@ int msg_verify_oml_structure(struct msgb *msg) struct abis_om_hdr *omh; if (msgb_l2len(msg) < sizeof(*omh)) { - LOGP(DL1C, LOGL_ERROR, "Om header insufficient space %d %d\n", + LOGP(DL1C, LOGL_ERROR, "Om header insufficient space %d %zu\n", msgb_l2len(msg), sizeof(*omh)); return -1; } diff --git a/src/common/vty.c b/src/common/vty.c index 0d52dd7..08ad5d4 100644 --- a/src/common/vty.c +++ b/src/common/vty.c @@ -21,6 +21,7 @@ #include "btsconfig.h" +#include #include #include #include @@ -577,8 +578,8 @@ static void bts_dump_vty(struct vty *vty, struct gsm_bts *bts) paging_get_queue_max(btsb->paging_state), paging_queue_length(btsb->paging_state), paging_get_lifetime(btsb->paging_state), VTY_NEWLINE); vty_out(vty, " AGCH: Queue limit %u, occupied %d, " - "dropped %llu, merged %llu, rejected %llu, " - "ag-res %llu, non-res %llu%s", + "dropped %"PRIu64", merged %"PRIu64", rejected %"PRIu64", " + "ag-res %"PRIu64", non-res %"PRIu64"%s", btsb->agch_max_queue_length, btsb->agch_queue_length, btsb->agch_queue_dropped_msgs, btsb->agch_queue_merged_msgs, btsb->agch_queue_rejected_msgs, btsb->agch_queue_agch_msgs, diff --git a/tests/agch/agch_test.c b/tests/agch/agch_test.c index 24fa847..4175bdd 100644 --- a/tests/agch/agch_test.c +++ b/tests/agch/agch_test.c @@ -25,6 +25,7 @@ #include #include +#include #include static struct gsm_bts *bts; @@ -143,8 +144,8 @@ static void test_agch_queue(void) printf("AGCH filled: count %u, imm.ass %d, imm.ass.rej %d (refs %d), " "queue limit %u, occupied %d, " - "dropped %llu, merged %llu, rejected %llu, " - "ag-res %llu, non-res %llu\n", + "dropped %"PRIu64", merged %"PRIu64", rejected %"PRIu64", " + "ag-res %"PRIu64", non-res %"PRIu64"\n", count, imm_ass_count, imm_ass_rej_count, imm_ass_rej_ref_count, btsb->agch_max_queue_length, btsb->agch_queue_length, btsb->agch_queue_dropped_msgs, btsb->agch_queue_merged_msgs, @@ -182,8 +183,8 @@ static void test_agch_queue(void) printf("AGCH drained: multiframes %u, imm.ass %d, imm.ass.rej %d (refs %d), " "queue limit %u, occupied %d, " - "dropped %llu, merged %llu, rejected %llu, " - "ag-res %llu, non-res %llu\n", + "dropped %"PRIu64", merged %"PRIu64", rejected %"PRIu64", " + "ag-res %"PRIu64", non-res %"PRIu64"\n", multiframes, imm_ass_count, imm_ass_rej_count, imm_ass_rej_ref_count, btsb->agch_max_queue_length, btsb->agch_queue_length, btsb->agch_queue_dropped_msgs, btsb->agch_queue_merged_msgs,