[ovs-git] [openvswitch/ovs] c00279: type-props: Avoid a MSVC warning.

GitHub noreply at github.com
Fri Jul 17 20:22:55 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: c002791a30818c2458599f993d1711e03566e7cc
      https://github.com/openvswitch/ovs/commit/c002791a30818c2458599f993d1711e03566e7cc
  Author: Gurucharan Shetty <gshetty at nicira.com>
  Date:   2015-07-17 (Fri, 17 Jul 2015)

  Changed paths:
    M lib/type-props.h

  Log Message:
  -----------
  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 at nicira.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>




More information about the git mailing list