All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stefan Schmidt <stefan@datenfreihafen.org>
To: linux-wpan@vger.kernel.org
Cc: aring@mojatatu.com
Subject: Re: [PATCH 2/2] examples: fix wrongly used unsigned attribute
Date: Wed, 19 Dec 2018 14:33:26 +0100	[thread overview]
Message-ID: <e4b9779f-1456-783d-bf33-c2107d91c2cb@datenfreihafen.org> (raw)
In-Reply-To: <20181206202602.22176-2-stefan@datenfreihafen.org>

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

  reply	other threads:[~2018-12-19 13:33 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 ` [PATCH 2/2] examples: fix wrongly used unsigned attribute Stefan Schmidt
2018-12-19 13:33   ` Stefan Schmidt [this message]
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=e4b9779f-1456-783d-bf33-c2107d91c2cb@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.