Message ID | 20181206202602.22176-2-stefan@datenfreihafen.org (mailing list archive) |
---|---|
State | Accepted |
Headers | show |
Series | [1/2] iwpan: fix clang compiler warning on absolute-value | expand |
Hello. On 06.12.18 21:26, Stefan Schmidt wrote: > 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); > This patch has now been applied to wpan-tools. regards Stefan Schmidt
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);
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(-)