[ovs-git] [openvswitch/ovs] 99970e: lib/util.h: use types compatible with DWORD

GitHub noreply at github.com
Thu Feb 12 19:15:58 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 99970e95bc827323ad9b9cfb326f2204b76300d8
      https://github.com/openvswitch/ovs/commit/99970e95bc827323ad9b9cfb326f2204b76300d8
  Author: Nithin Raju <nithin at vmware.com>
  Date:   2015-02-12 (Thu, 12 Feb 2015)

  Changed paths:
    M lib/util.h

  Log Message:
  -----------
  lib/util.h: use types compatible with DWORD

_BitScanForward() and friends are part of the Windows API and
take DWORD as parameter type. DWORD is defined to be 'unsigned long'
in Windows' header files.

We call into these functions from within lib/util.h. Currently, we
pass arguments of type uint32_t which is type defined to
'unsigned int'. This incompatiblity causes failures when we compile
the code as C++ code or with warnings enabled, when compiled as C
code.

The fix is to use 'unsigned long' rather than fixed size type.

Co-Authored-by: Linda Sun <lsun at vmware.com>
Signed-off-by: Nithin Raju <nithin at vmware.com>
Signed-off-by: Linda Sun <lsun at vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>




More information about the git mailing list