From: Stefan Schmidt <stefan@datenfreihafen.org>
To: linux-wpan@vger.kernel.org
Cc: aring@mojatatu.com, Stefan Schmidt <stefan@datenfreihafen.org>
Subject: [PATCH 2/2] examples: fix wrongly used unsigned attribute
Date: Thu, 6 Dec 2018 21:26:02 +0100 [thread overview]
Message-ID: <20181206202602.22176-2-stefan@datenfreihafen.org> (raw)
In-Reply-To: <20181206202602.22176-1-stefan@datenfreihafen.org>
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 <stefan@datenfreihafen.org>
---
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);
--
2.17.2
next prev parent reply other threads:[~2018-12-06 20:26 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-06 20:26 [PATCH 1/2] iwpan: fix clang compiler warning on absolute-value Stefan Schmidt
2018-12-06 20:26 ` Stefan Schmidt [this message]
2018-12-19 13:33 ` [PATCH 2/2] examples: fix wrongly used unsigned attribute Stefan Schmidt
2018-12-19 13:33 ` [PATCH 1/2] iwpan: fix clang compiler warning on absolute-value Stefan Schmidt
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181206202602.22176-2-stefan@datenfreihafen.org \
--to=stefan@datenfreihafen.org \
--cc=aring@mojatatu.com \
--cc=linux-wpan@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.