From: Thomas Monjalon <thomas@monjalon.net>
To: Andy Green <andy@warmcat.com>
Cc: dev@dpdk.org, stable@dpdk.org
Subject: Re: [dpdk-stable] [dpdk-dev] [PATCH v3 03/24] rte_common.h: cast gcc builtin result to avoid complaints
Date: Sun, 13 May 2018 22:40:00 +0200 [thread overview]
Message-ID: <2487048.egYbSRWGYj@xps> (raw)
In-Reply-To: <152609033730.121661.15300461327237900961.stgit@localhost.localdomain>
12/05/2018 03:58, Andy Green:
> /projects/lagopus/src/dpdk/build/include/rte_common.h:416:9:
> warning: conversion to 'uint32_t' {aka 'unsigned int'} from
> 'int' may change the sign of the result [-Wsign-conversion]
> return __builtin_ctz(v);
> ^~~~~~~~~~~~~~~~
>
> The builtin is defined to return int, but we want to
> return it as uint32_t. Its only defined valid return
> values are positive integers or zero, which is OK for
> uint32_t. So just add an explicit cast.
Fixes: 03f6bced5bba ("eal: use intrinsic function")
Cc: stable@dpdk.org
> Signed-off-by: Andy Green <andy@warmcat.com>
Applied, thanks
next parent reply other threads:[~2018-05-13 20:40 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <152609021699.121661.5295227351721865436.stgit@localhost.localdomain>
[not found] ` <152609033730.121661.15300461327237900961.stgit@localhost.localdomain>
2018-05-13 20:40 ` Thomas Monjalon [this message]
[not found] ` <152609034736.121661.8183957126379452765.stgit@localhost.localdomain>
2018-05-13 20:40 ` [dpdk-stable] [dpdk-dev] [PATCH v3 05/24] lib/librte_eal: explicit cast for signed change Thomas Monjalon
[not found] ` <152609037252.121661.1483829650676418151.stgit@localhost.localdomain>
2018-05-13 20:41 ` [dpdk-stable] [dpdk-dev] [PATCH v3 10/24] rte_dev.h: stack declaration at top of own basic block Thomas Monjalon
[not found] ` <152609035743.121661.16417462726686469432.stgit@localhost.localdomain>
2018-05-13 20:42 ` [dpdk-stable] [dpdk-dev] [PATCH v3 07/24] rte_spinlock.h: stack declarations before code Thomas Monjalon
[not found] ` <152609041781.121661.10252991105854625648.stgit@localhost.localdomain>
2018-05-13 20:42 ` [dpdk-stable] [dpdk-dev] [PATCH v3 19/24] rte_ether.h: stack vars declared at top of function Thomas Monjalon
[not found] ` <152609042788.121661.16333710243796218948.stgit@localhost.localdomain>
2018-05-13 20:43 ` [dpdk-stable] [dpdk-dev] [PATCH v3 21/24] rte_ethdev.h: explicit cast for truncation Thomas Monjalon
[not found] ` <152609043291.121661.10977996123332031645.stgit@localhost.localdomain>
2018-05-13 20:44 ` [dpdk-stable] [dpdk-dev] [PATCH v3 22/24] rte_hash_crc.h: stack vars declared at top of function Thomas Monjalon
[not found] ` <152609043794.121661.2576318465909542545.stgit@localhost.localdomain>
2018-05-13 20:44 ` [dpdk-stable] [dpdk-dev] [PATCH v3 23/24] rte_hash_crc.h: explicit casts for truncation Thomas Monjalon
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=2487048.egYbSRWGYj@xps \
--to=thomas@monjalon.net \
--cc=andy@warmcat.com \
--cc=dev@dpdk.org \
--cc=stable@dpdk.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).