lib/util.h: use types compatible with DWORD
authorNithin Raju <nithin@vmware.com>
Thu, 12 Feb 2015 18:53:10 +0000 (10:53 -0800)
committerGurucharan Shetty <gshetty@nicira.com>
Thu, 12 Feb 2015 19:14:42 +0000 (11:14 -0800)
commit99970e95bc827323ad9b9cfb326f2204b76300d8
treef9eaf63cc5b2dafdeaa10840a1aeffeb65779402
parent05082734f3dfc185c56a42d30b670e13e0178114
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@vmware.com>
Signed-off-by: Nithin Raju <nithin@vmware.com>
Signed-off-by: Linda Sun <lsun@vmware.com>
Signed-off-by: Gurucharan Shetty <gshetty@nicira.com>
lib/util.h