Suppress sparse warnings for global variables initialized in headers.
authorBen Pfaff <blp@nicira.com>
Fri, 6 May 2011 18:38:19 +0000 (11:38 -0700)
committerBen Pfaff <blp@nicira.com>
Mon, 16 May 2011 20:40:48 +0000 (13:40 -0700)
commitf4070db7e5ae7727876d6cc318fba10033dc2c85
tree79f11ffa1f4f5987b557ac23b858a77a195a3b60
parent2932bd0512422ca9540a9a99c57c3a7f60d22df0
Suppress sparse warnings for global variables initialized in headers.

sparse warns if a non-static variable with external linkage has an
initializer at first declaration, because it suspects that it should be
static instead.  Generally it's correct, but not in these cases, so add
a redundant declaration to suppress the warning.

The suppress warnings look like:
../ofproto/connmgr.c:40:1: warning: symbol 'VLM_connmgr' was not declared. Should it be static?
../ofproto/collectors.c:31:1: warning: symbol 'vlog_module_ptr_collectors' was not declared. Should it be static?
../ofproto/connmgr.c:43:1: warning: symbol 'counter_ofconn_stuck' was not declared. Should it be static?
lib/coverage.h
lib/stress.h
lib/vlog.h