service: fix build with gcc 4.9
authorYi Yang <yi.y.yang@intel.com>
Thu, 21 Sep 2017 01:50:43 +0000 (09:50 +0800)
committerThomas Monjalon <thomas@monjalon.net>
Thu, 21 Sep 2017 12:42:53 +0000 (14:42 +0200)
commitca13673513b656e632d5b348de2aa448b55ba9de
treec85fc66af59d8b7b1be26440d2c85ea769a8ecbd
parent3d2e0448ebb5c76fda6e988558793c070c3baded
service: fix build with gcc 4.9

Some compilers detect this error:

    error: ‘ids[0]’ may be used uninitialized in this function
    ret = rte_service_map_lcore_set(i, ids[lcore_iter], 1);

It can be reproduced very easily on Fedora 21 with
gcc-4.9.2-6.fc21.x86_64.

Fixes: 21698354c832 ("service: introduce service cores concept")
Cc: stable@dpdk.org
Signed-off-by: Yi Yang <yi.y.yang@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
lib/librte_eal/common/rte_service.c