[ovs-dev] [PATCH 1/1] ovn-nbctl: Initialize arguments to avoid compilation warnings.

Ben Pfaff blp at ovn.org
Tue Jul 31 19:53:09 UTC 2018


On Thu, Jul 26, 2018 at 10:05:01AM +0200, Jakub Sitnicki wrote:
> On Wed, 25 Jul 2018 15:00:43 +0100
> Ian Stokes <ian.stokes at intel.com> wrote:
> 
> > Output arguments for parse_priority() and dhcp_options_get() may not be
> > initialized when either function returns an error.
> > 
> > This causes compilation warnings for GCC 6.3.x regarding use of
> > uninitialized variable use and null-pointer-arithmetic.
> > 
> > Fix this by initializing priority_p* value to 0 for priority_parse()
> > when an error occurs during parsing.
> > 
> > For dhcp_options_get() set *dhcp_opts_p = dhcp_opts regardless as
> > dhcp_opts will be equal to NULL when an error occurs within the function
> > anyhow.
> > 
> > Cc: Jakub Sitnicki <jkbs at redhat.com>
> > Fixes: 3844c85de979 ("ovn-nbctl: Don't die in dhcp_options_get()."
> > Fixes: bc8223df3b01 ("ovn-nbctl: Don't die in parse_priority().")
> > Signed-off-by: Ian Stokes <ian.stokes at intel.com>
> > ---
> 
> Thank you for fixing it up.
> 
> Acked-by: Jakub Sitnicki <jkbs at redhat.com>

Thanks, applied to master and branch-2.10.


More information about the dev mailing list