eal: allow empty compile time cpu flags
authorZhigang Lu <zlu@ezchip.com>
Thu, 9 Jul 2015 08:25:12 +0000 (16:25 +0800)
committerThomas Monjalon <thomas.monjalon@6wind.com>
Mon, 13 Jul 2015 14:15:46 +0000 (16:15 +0200)
commitd67b8d7bd88123af2802c14a9815ecbac0567cfa
treeb4d1a0df74f65eec6bbd59beb963db6915d16ae3
parent67ea75ffc6bcaed5001e3b6f3e93debbfb0df500
eal: allow empty compile time cpu flags

When RTE_COMPILE_TIME_CPUFLAGS is empty, the rte_cpu_check_supported()
code breaks with a "comparison is always false due to limited range of
data type".  This is because the compile_time_flags[] array is empty.
Assigning the array dimension to a local variable apparently solves this.

Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com>
Signed-off-by: Zhigang Lu <zlu@ezchip.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
lib/librte_eal/common/eal_common_cpuflags.c