2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-27 15:18:06 +00:00

Make the source tree sparse clean.

With this commit, the tree compiles clean with sparse commit 87f4a7fda3d
"Teach 'already_tokenized()' to use the stream name hash table" with patch
"evaluate: Allow sizeof(_Bool) to succeed" available at
http://permalink.gmane.org/gmane.comp.parsers.sparse/2461 applied, as long
as the "include/sparse" directory is included for use by sparse (only),
e.g.:
     make CC="CHECK='sparse -I../include/sparse' cgcc"
This commit is contained in:
Ben Pfaff
2011-05-06 12:59:51 -07:00
parent c4cac9abf2
commit 6506f45c08
16 changed files with 616 additions and 7 deletions

View File

@@ -18,6 +18,8 @@
#include "csum.h"
#include "unaligned.h"
#ifndef __CHECKER__
/* Returns the IP checksum of the 'n' bytes in 'data'.
*
* The return value has the same endianness as the data. That is, if 'data'
@@ -109,3 +111,8 @@ recalc_csum32(ovs_be16 old_csum, ovs_be32 old_u32, ovs_be32 new_u32)
return recalc_csum16(recalc_csum16(old_csum, old_u32, new_u32),
old_u32 >> 16, new_u32 >> 16);
}
#else /* __CHECKER__ */
/* Making sparse happy with these functions also makes them unreadable, so
* don't bother to show it their implementations. */
#endif