2
0
mirror of https://github.com/openvswitch/ovs synced 2025-09-03 07:45:30 +00:00

sparse: Suppress sparse warnings for global variables.

sparse warns if a non-static variable with external linkage has an
initializer at first declaration.  This commit suppresses the
warnings issued when adding custom section is not supported by
compiler.

Signed-off-by: Alex Wang <alexw@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
This commit is contained in:
Alex Wang
2013-08-20 15:24:19 -07:00
committed by Ben Pfaff
parent 5675cb4cbd
commit 3f659b5326
2 changed files with 3 additions and 0 deletions

View File

@@ -46,11 +46,13 @@ extern struct coverage_counter *__stop_coverage[];
*countp = 0; \
return count; \
} \
extern struct coverage_counter counter_##COUNTER; \
struct coverage_counter counter_##COUNTER \
= { #COUNTER, COUNTER##_count, 0 };
#include "coverage.def"
#undef COVERAGE_COUNTER
extern struct coverage_counter *coverage_counters[];
struct coverage_counter *coverage_counters[] = {
#define COVERAGE_COUNTER(NAME) &counter_##NAME,
#include "coverage.def"