2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-19 14:37:21 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Ben Pfaff
e7b3e606b2 test-csum: Avoid "cast increases required alignment of target type" warning.
Casting a character pointer to uint16_t * or uint32_t * provokes this
warning on sparc.  There is no actual problem, because all of the accesses
to data occurs through calls to the get_unaligned_*() functions, so this
commit suppresses the warning by using "void *" as an intermediate type.
2011-05-26 09:03:05 -07:00
Ben Pfaff
d84d4b88d2 Fix incorrect byte order annotations.
These are not actual bugs, just deceptive use of the wrong function or
type.

Found by sparse.
2011-05-16 13:40:47 -07:00
Ben Pfaff
8064219064 csum: Avoid misaligned data access.
This should fix a checksum test failure observed on Alpha in Debian's
buildds.
2010-11-16 12:52:10 -08:00
Ben Pfaff
d932cf70b1 test-csum: Make test_case requirements clear.
This test code only works properly with test cases whose data is a multiple
of 4, so make that clear in the code and the data.
2010-11-16 12:51:08 -08:00
Ben Pfaff
2a022368f4 Avoid shadowing local variable names.
All of these changes avoid using the same name for two local variables
within a same function.  None of them are actual bugs as far as I can tell,
but any of them could be confusing to the casual reader.

The one in lib/ovsdb-idl.c is particularly brilliant: inner and outer
loops both using (different) variables named 'i'.

Found with GCC -Wshadow.
2010-09-20 09:39:54 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
21effc0384 Add unit test for TCP/IP checksumming code. 2009-06-09 17:10:18 -07:00