[ovs-dev] new GCC and sparse warnings on v2.6.36

Ben Pfaff blp at nicira.com
Wed Dec 29 19:19:56 UTC 2010


With v2.6.36 and "master" I'm getting new sparse warnings.  I'm happy to
ignore these if they go away in v2.6.37 (haven't tried it):

  CHECK   /home/blp/db/_build/datapath/linux-2.6/dp_notify.c
  CC [M]  /home/blp/db/_build/datapath/linux-2.6/dp_notify.o
/home/blp/db/_build/datapath/linux-2.6/datapath.c:99:16: warning: incorrect type in argument 1 (different modifiers)
/home/blp/db/_build/datapath/linux-2.6/datapath.c:99:16:    expected struct lockdep_map *lock
/home/blp/db/_build/datapath/linux-2.6/datapath.c:99:16:    got struct lockdep_map const *<noident>
/home/blp/db/_build/datapath/linux-2.6/datapath.c:106:16: warning: incorrect type in argument 1 (different modifiers)
/home/blp/db/_build/datapath/linux-2.6/datapath.c:106:16:    expected struct lockdep_map *lock
/home/blp/db/_build/datapath/linux-2.6/datapath.c:106:16:    got struct lockdep_map const *<noident>

But I'm also getting new GCC warnings that I don't like very much:

  CC [M]  /home/blp/db/_build/datapath/linux-2.6/dp_sysfs_dp.o
  CHECK   /home/blp/db/_build/datapath/linux-2.6/dp_sysfs_if.c
/home/blp/db/_build/datapath/linux-2.6/datapath.c: In function 'get_table_protected':
/home/blp/db/_build/datapath/linux-2.6/datapath.c:99: warning: passing argument 1 of 'lock_is_held' discards qualifiers from pointer target type
include/linux/lockdep.h:313: note: expected 'struct lockdep_map *' but argument is of type 'const struct lockdep_map *'
/home/blp/db/_build/datapath/linux-2.6/datapath.c: In function 'get_vport_protected':
/home/blp/db/_build/datapath/linux-2.6/datapath.c:106: warning: passing argument 1 of 'lock_is_held' discards qualifiers from pointer target type
include/linux/lockdep.h:313: note: expected 'struct lockdep_map *' but argument is of type 'const struct lockdep_map *'
  CC [M]  /home/blp/db/_build/datapath/linux-2.6/dp_sysfs_if.o
  CHECK   /home/blp/db/_build/datapath/linux-2.6/flow.c
  CC [M]  /home/blp/db/_build/datapath/linux-2.6/flow.o
  CHECK   /home/blp/db/_build/datapath/linux-2.6/loop_counter.c

The following is one that I got before and am happy to continue ignoring:

/home/blp/db/_build/datapath/linux-2.6/loop_counter.c:35:8: warning: symbol 'loop_counters' was not declared. Should it be static?
  CC [M]  /home/blp/db/_build/datapath/linux-2.6/loop_counter.o




More information about the dev mailing list