[dpdk-dev,v2] ixgbe: disable icc compile warning

Message ID 1458840891-30237-1-git-send-email-ferruh.yigit@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Bruce Richardson
Headers

Commit Message

Ferruh Yigit March 24, 2016, 5:34 p.m. UTC
  icc (icc (ICC) 16.0.1 20151021) is generating following compile error:
"
  CC ixgbe_rxtx.o
  .../drivers/net/ixgbe/ixgbe_rxtx.c(153): error #3656: variable
  "free" may be used before its value is set
                      (nb_free > 0 && m->pool != free[0]->pool)) {
			                         ^
"

Indeed this is a false positive and code is correct.
"nb_free" check prevents the free[] access before its value set.

Disabling this icc warning (#3656) for file ixgbe_rxtx.c.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/ixgbe/Makefile | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ananyev, Konstantin March 24, 2016, 5:47 p.m. UTC | #1
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Thursday, March 24, 2016 5:35 PM
> To: dev@dpdk.org
> Cc: Stephen Hemminger; Ananyev, Konstantin; Yigit, Ferruh
> Subject: [PATCH v2] ixgbe: disable icc compile warning
> 
> icc (icc (ICC) 16.0.1 20151021) is generating following compile error:
> "
>   CC ixgbe_rxtx.o
>   .../drivers/net/ixgbe/ixgbe_rxtx.c(153): error #3656: variable
>   "free" may be used before its value is set
>                       (nb_free > 0 && m->pool != free[0]->pool)) {
> 			                         ^
> "
> 
> Indeed this is a false positive and code is correct.
> "nb_free" check prevents the free[] access before its value set.
> 
> Disabling this icc warning (#3656) for file ixgbe_rxtx.c.
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> ---
>  drivers/net/ixgbe/Makefile | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
> index c032775..50bf51c 100644
> --- a/drivers/net/ixgbe/Makefile
> +++ b/drivers/net/ixgbe/Makefile
> @@ -49,6 +49,8 @@ ifeq ($(CC), icc)
>  #
>  CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
> 
> +CFLAGS_ixgbe_rxtx.o += -wd3656
> +
>  else ifeq ($(CC), clang)
>  #
>  # CFLAGS for clang
> --

Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>

> 2.5.0
  
Bruce Richardson March 25, 2016, 1:57 p.m. UTC | #2
On Thu, Mar 24, 2016 at 05:47:21PM +0000, Ananyev, Konstantin wrote:
> > -----Original Message-----
> > From: Yigit, Ferruh
> > Sent: Thursday, March 24, 2016 5:35 PM
> > To: dev@dpdk.org
> > Cc: Stephen Hemminger; Ananyev, Konstantin; Yigit, Ferruh
> > Subject: [PATCH v2] ixgbe: disable icc compile warning
> > 
> > icc (icc (ICC) 16.0.1 20151021) is generating following compile error:
> > "
> >   CC ixgbe_rxtx.o
> >   .../drivers/net/ixgbe/ixgbe_rxtx.c(153): error #3656: variable
> >   "free" may be used before its value is set
> >                       (nb_free > 0 && m->pool != free[0]->pool)) {
> > 			                         ^
> > "
> > 
> > Indeed this is a false positive and code is correct.
> > "nb_free" check prevents the free[] access before its value set.
> > 
> > Disabling this icc warning (#3656) for file ixgbe_rxtx.c.
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> > ---
> >  drivers/net/ixgbe/Makefile | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
> > index c032775..50bf51c 100644
> > --- a/drivers/net/ixgbe/Makefile
> > +++ b/drivers/net/ixgbe/Makefile
> > @@ -49,6 +49,8 @@ ifeq ($(CC), icc)
> >  #
> >  CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
> > 
> > +CFLAGS_ixgbe_rxtx.o += -wd3656
> > +
> >  else ifeq ($(CC), clang)
> >  #
> >  # CFLAGS for clang
> > --
> 
> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
>
Applied to dpdk-next-net/rel_16_04

/Bruce
  

Patch

diff --git a/drivers/net/ixgbe/Makefile b/drivers/net/ixgbe/Makefile
index c032775..50bf51c 100644
--- a/drivers/net/ixgbe/Makefile
+++ b/drivers/net/ixgbe/Makefile
@@ -49,6 +49,8 @@  ifeq ($(CC), icc)
 #
 CFLAGS_BASE_DRIVER = -wd174 -wd593 -wd869 -wd981 -wd2259
 
+CFLAGS_ixgbe_rxtx.o += -wd3656
+
 else ifeq ($(CC), clang)
 #
 # CFLAGS for clang