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>
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>
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>
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]