numam-dpdk/lib/librte_eal/linuxapp
Olivier Matz 11fd19f764 mem: fix build with -O1
When compiled with EXTRA_CFLAGS="-O1", the compiler is not
able to detect that size is always initialized when used, and
issues a wrong warning:

  eal_memory.c: In function ‘rte_eal_hugepage_attach’:
  eal_memory.c:1684:3: error: ‘size’ may be used uninitialized in this
                       function [-Werror=maybe-uninitialized]
     munmap(hp, size);
     ^

Workaround this issue by initializing size to 0.
Seen on gcc (Debian 5.4.1-1) 5.4.1 20160803.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2016-10-06 15:23:53 +02:00
..
eal mem: fix build with -O1 2016-10-06 15:23:53 +02:00
igb_uio igb_uio: fix possible mmap failure with Linux 4.5 2016-07-10 15:56:54 +02:00
kni kni: remove unnecessary ethtool files 2016-10-05 15:45:21 +02:00
xen_dom0 config: remove useless explicit includes of generated header 2016-02-10 22:43:38 +01:00
Makefile config: remove EAL flags for OS environment 2016-03-05 11:09:31 +01:00