svn commit: r276530 - head/sys/x86/xen

Colin Percival cperciva at freebsd.org
Fri Jan 2 09:48:53 UTC 2015


On 01/02/15 00:42, Hans Petter Selasky wrote:
> Author: hselasky
> Date: Fri Jan  2 08:42:44 2015
> New Revision: 276530
> URL: https://svnweb.freebsd.org/changeset/base/276530
> 
> Log:
>   Fix warning about possible use of uninitialized variable.

Looks to me like the right solution here would be to add
	bool initial_domain = xen_initial_domain();
and then s/xen_initial_domain()/initial_domain/ in the rest of the
function.  That should make it clear to static analysis tools that
acpi_dev will not be used uninitialized -- since the problem right
now is that they don't know that xen_initial_domain() always returns
the same value --  without having a bogus initialization which could
hide a future bug.

-- 
Colin Percival
Security Officer Emeritus, FreeBSD | The power to serve
Founder, Tarsnap | www.tarsnap.com | Online backups for the truly paranoid


More information about the svn-src-all mailing list