type-props: Avoid a MSVC warning.
authorGurucharan Shetty <gshetty@nicira.com>
Fri, 17 Jul 2015 15:48:23 +0000 (08:48 -0700)
committerGurucharan Shetty <gshetty@nicira.com>
Fri, 17 Jul 2015 20:21:46 +0000 (13:21 -0700)
commitc002791a30818c2458599f993d1711e03566e7cc
tree7b4d49e55b783ab13fa67105ccc00af2cb5af038
parentce6f1d1fc55a26e3ae56d81fadfffde566937c62
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>
lib/type-props.h