[ovs-dev] [PATCH 3/3] Avoid uninitialized variable warnings with OBJECT_OFFSETOF() in MSVC.

Ben Pfaff blp at nicira.com
Thu Sep 11 18:01:59 UTC 2014


On Wed, Sep 10, 2014 at 12:55:48PM -0700, Gurucharan Shetty wrote:
> Implementation of OBJECT_OFFSETOF() for non-GNUC compilers like MSVC
> causes "uninitialized variable" warnings. Since OBJECT_OFFSETOF() is
> indirectly used through all the *_FOR_EACH() (through ASSIGN_CONTAINER()
> and  OBJECT_CONTAINING()) macros, the OVS build
> on Windows gets littered with "uninitialized variable" warnings.
> This patch attempts to workaround the problem.
> 
> Signed-off-by: Gurucharan Shetty <gshetty at nicira.com>

Not a great solution but it's an ugly problem to begin with.

Acked-by: Ben Pfaff <blp at nicira.com>



More information about the dev mailing list