Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ofpbuf: Fix parameter for const initializer.
Clang 4.0 complains: In file included from include/openvswitch/cxxtest.cc:11:0: ../include/openvswitch/ofpbuf.h: In function ‘ofpbuf ofpbuf_const_initializer(const void*, size_t)’: ../include/openvswitch/ofpbuf.h:107:5: warning: narrowing conversion of ‘size’ from ‘size_t {aka long unsigned int}’ to ‘uint32_t {aka unsigned int}’ inside { } [-Wnarrowing] }; ^ ../include/openvswitch/ofpbuf.h:107:5: warning: narrowing conversion of ‘size’ from ‘size_t {aka long unsigned int}’ to ‘uint32_t {aka unsigned int}’ inside { } [-Wnarrowing] This is because the ofpbuf struct's "size" parameter is a uint32_t, while ofpbuf_const_initializer() takes a size_t for the size. Fix this function to take a uint32_t instead. Signed-off-by: Joe Stringer <[email protected]> Acked-by: Ben Pfaff <[email protected]>
- Loading branch information