2
0
mirror of https://github.com/openvswitch/ovs synced 2025-10-13 14:07:02 +00:00
Commit Graph

7 Commits

Author SHA1 Message Date
Ben Pfaff
0f395fd366 type-props: Suppress warnings in newer Clang and GCC.
Until now, Clang 3.7+ and sufficiently new versions of GCC complained about
TYPE_MAXIMUM(int), etc., because it shifts a negative value.  This commit
fixes the problem.

This commit also gives these macros sensible definitions for _Bool, and
documents all of them.

Reported-by: Joe Stringer <joestringer@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
Acked-by: Joe Stringer <joestringer@nicira.com>
2015-07-30 18:00:01 -07:00
Gurucharan Shetty
c002791a30 type-props: Avoid a MSVC warning.
Currently, MSVC complains when you have a macro of the
form TYPE_MAXIMUM(uint64_t) because a part of macro becomes
~(uint64_t)0 << 64 with a warning:

C4293: '<<' : shift count negative or too big, undefined behavior.

This commit makes changes to the macro to prevent that warning.

Suggested-by: Ben Pfaff <blp@nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
Acked-by: Ben Pfaff <blp@nicira.com>
2015-07-17 13:21:46 -07:00
Raju Subramanian
e0edde6fee Global replace of Nicira Networks.
Replaced all instances of Nicira Networks(, Inc) to Nicira, Inc.

Feature #10593
Signed-off-by: Raju Subramanian <rsubramanian@nicira.com>
Signed-off-by: Ben Pfaff <blp@nicira.com>
2012-05-02 17:08:02 -07:00
Ethan Jackson
5ce1c3c64d lib: TYPE_IS_SIGNED macro generates compiler warnings.
The TYPE_IS_SIGNED macro does a less than zero comparision with an
unsigned type which can cause compiler warnings like the following:

lib/tag.c💯9: error: comparison of unsigned expression < 0 is
always false [-Werror=type-limits]
2011-09-13 14:29:41 -07:00
Ben Pfaff
67a51a1d85 type-props: New macro for estimating length of a decimal integer. 2011-04-04 10:58:54 -07:00
Ben Pfaff
a14bc59fb8 Update primary code license to Apache 2.0. 2009-06-15 15:11:30 -07:00
Ben Pfaff
064af42167 Import from old repository commit 61ef2b42a9c4ba8e1600f15bb0236765edc2ad45. 2009-07-08 13:19:16 -07:00