[ovs-dev] [PATCH v2] lib/util.h: use types compatible with DWORD

Gurucharan Shetty shettyg at nicira.com
Thu Feb 12 19:16:20 UTC 2015


On Thu, Feb 12, 2015 at 10:53 AM, Nithin Raju <nithin at vmware.com> wrote:
> _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.
>
> Signed-off-by: Nithin Raju <nithin at vmware.com>
> Signed-off-by: Linda Sun <lsun at vmware.com>
> Co-Authored-by: Linda Sun <lsun at vmware.com>
Thank you. Applied!



More information about the dev mailing list