From patchwork Mon Mar 14 22:52:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Neels Hofmeyr X-Patchwork-Id: 597270 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.osmocom.org (lists.osmocom.org [IPv6:2a01:4f8:191:444b::2:7]) by ozlabs.org (Postfix) with ESMTP id 3qPCjL4FP3z9sD3 for ; Tue, 15 Mar 2016 09:53:56 +1100 (AEDT) Received: from lists.osmocom.org (lists.osmocom.org [144.76.43.76]) by lists.osmocom.org (Postfix) with ESMTP id 2349E1B352; Mon, 14 Mar 2016 22:53:52 +0000 (UTC) X-Original-To: openbsc@lists.osmocom.org Delivered-To: openbsc@lists.osmocom.org Received: from einhorn.in-berlin.de (einhorn.in-berlin.de [IPv6:2001:bf0:c000::1:8]) by lists.osmocom.org (Postfix) with ESMTP id B802A1B34B for ; Mon, 14 Mar 2016 22:53:50 +0000 (UTC) X-Envelope-From: nhofmeyr@sysmocom.de X-Envelope-To: Received: from localhost (cable-86-56-22-165.cust.telecolumbus.net [86.56.22.165]) (authenticated bits=0) by einhorn.in-berlin.de (8.14.4/8.14.4/Debian-4) with ESMTP id u2EMrnwS023790 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Mon, 14 Mar 2016 23:53:49 +0100 From: Neels Hofmeyr To: openbsc@lists.osmocom.org Subject: [PATCH] gsm0480.c: squelch compiler warning due to const (caused recently) Date: Mon, 14 Mar 2016 23:52:39 +0100 Message-Id: <1457995959-12157-1-git-send-email-nhofmeyr@sysmocom.de> X-Mailer: git-send-email 2.1.4 X-BeenThere: openbsc@lists.osmocom.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Development of OpenBSC, OsmoBSC, OsmoNITB, OsmoCSCN" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: openbsc-bounces@lists.osmocom.org Sender: "OpenBSC" The introduction of gsm48_hdr_pdisc() caused a new compiler warning. In gsm0480_decode_*(), the gsm48_hdr is const, which we can safely cast away to avoid the warning. --- src/gsm/gsm0480.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gsm/gsm0480.c b/src/gsm/gsm0480.c index 8963b78..bb47cc6 100644 --- a/src/gsm/gsm0480.c +++ b/src/gsm/gsm0480.c @@ -220,7 +220,7 @@ int gsm0480_decode_ussd_request(const struct gsm48_hdr *hdr, uint16_t len, return 0; } - if (gsm48_hdr_pdisc(hdr) == GSM48_PDISC_NC_SS) { + if (gsm48_hdr_pdisc((struct gsm48_hdr*)hdr) == GSM48_PDISC_NC_SS) { req->transaction_id = hdr->proto_discr & 0x70; ss.transaction_id = req->transaction_id; @@ -254,7 +254,7 @@ int gsm0480_decode_ss_request(const struct gsm48_hdr *hdr, uint16_t len, return 0; } - if (gsm48_hdr_pdisc(hdr) == GSM48_PDISC_NC_SS) { + if (gsm48_hdr_pdisc((struct gsm48_hdr*)hdr) == GSM48_PDISC_NC_SS) { req->transaction_id = hdr->proto_discr & 0x70; rc = parse_ss(hdr, len, req); }