From patchwork Thu Dec 6 20:26:02 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Schmidt X-Patchwork-Id: 10716747 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 3CF0713BF for ; Thu, 6 Dec 2018 20:26:32 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 2E2FD2F00A for ; Thu, 6 Dec 2018 20:26:32 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 2291E2F03A; Thu, 6 Dec 2018 20:26:32 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id C0B752F00A for ; Thu, 6 Dec 2018 20:26:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726148AbeLFU03 (ORCPT ); Thu, 6 Dec 2018 15:26:29 -0500 Received: from proxima.lasnet.de ([78.47.171.185]:53428 "EHLO proxima.lasnet.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726118AbeLFU03 (ORCPT ); Thu, 6 Dec 2018 15:26:29 -0500 Received: from localhost.localdomain (p200300E9D74E97CB8FE6EC091BFC9735.dip0.t-ipconnect.de [IPv6:2003:e9:d74e:97cb:8fe6:ec09:1bfc:9735]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: stefan@sostec.de) by proxima.lasnet.de (Postfix) with ESMTPSA id 812ECC8AE7; Thu, 6 Dec 2018 21:26:26 +0100 (CET) From: Stefan Schmidt To: linux-wpan@vger.kernel.org Cc: aring@mojatatu.com, Stefan Schmidt Subject: [PATCH 2/2] examples: fix wrongly used unsigned attribute Date: Thu, 6 Dec 2018 21:26:02 +0100 Message-Id: <20181206202602.22176-2-stefan@datenfreihafen.org> X-Mailer: git-send-email 2.17.2 In-Reply-To: <20181206202602.22176-1-stefan@datenfreihafen.org> References: <20181206202602.22176-1-stefan@datenfreihafen.org> Sender: linux-wpan-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-wpan@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP We are passing this buffer into sprintf later which expects signed. Its a constant string anyway, so it does not matter for us. Fixes -Wpointer-sign values spotted by our CI system. Signed-off-by: Stefan Schmidt --- examples/af_ieee802154_tx.c | 2 +- examples/af_inet6_tx.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/af_ieee802154_tx.c b/examples/af_ieee802154_tx.c index e85a109..faad17e 100644 --- a/examples/af_ieee802154_tx.c +++ b/examples/af_ieee802154_tx.c @@ -55,7 +55,7 @@ int main(int argc, char *argv[]) { int sd; ssize_t len; struct sockaddr_ieee802154 dst; - unsigned char buf[MAX_PACKET_LEN + 1]; + char buf[MAX_PACKET_LEN + 1]; /* IEEE 802.15.4 extended send address, adapt to your setup */ uint8_t long_addr[IEEE802154_ADDR_LEN] = {0xd6, 0x55, 0x2c, 0xd6, 0xe4, 0x1c, 0xeb, 0x57}; diff --git a/examples/af_inet6_tx.c b/examples/af_inet6_tx.c index 9fe7491..a62f730 100644 --- a/examples/af_inet6_tx.c +++ b/examples/af_inet6_tx.c @@ -35,7 +35,7 @@ int main(int argc, char *argv[]) { int ret, sd; struct sockaddr_in6 dst; struct ifreq ifr; - unsigned char buf[MAX_PACKET_LEN + 1]; + char buf[MAX_PACKET_LEN + 1]; /* Create IPv6 address family socket for the SOCK_DGRAM type */ sd = socket(PF_INET6, SOCK_DGRAM, 0);