aboutsummaryrefslogtreecommitdiff
path: root/lib/csum.c
diff options
context:
space:
mode:
authorBen Pfaff <blp@nicira.com>2011-05-06 12:59:51 -0700
committerBen Pfaff <blp@nicira.com>2011-05-16 13:45:53 -0700
commit6506f45c0818618e96deb858bbabdf2cc90eb2df (patch)
treeef898fc14eade893c460fcbd1b3d01c960595c96 /lib/csum.c
parentc4cac9abf211b74c777b86ad7281e7b0f42a3a39 (diff)
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"
Diffstat (limited to 'lib/csum.c')
-rw-r--r--lib/csum.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/lib/csum.c b/lib/csum.c
index 668d7108..47e803e3 100644
--- a/lib/csum.c
+++ b/lib/csum.c
@@ -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