This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
Home Products Support Community News


[Xen-devel] [PATCH]: minios: eliminate compile warning - use of uninitia

To: Xen Devel <xen-devel@xxxxxxxxxxxxxxxxxxx>
Subject: [Xen-devel] [PATCH]: minios: eliminate compile warning - use of uninitialised variable
From: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>
Date: Fri, 7 Jan 2011 16:52:49 +0000
Cc: Ian Jackson <Ian.Jackson@xxxxxxxxxxxxx>, Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
Delivery-date: Fri, 07 Jan 2011 08:53:47 -0800
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
I'm not sure if this is a legit catch by gcc or a false positive due to
extra cleverness in gcc-4.5. Either way it causes the build to barf.

Signed-off-by: Gianni Tedesco <gianni.tedesco@xxxxxxxxxx>

diff -r c55b93f3f8cf extras/mini-os/lib/math.c
--- a/extras/mini-os/lib/math.c Fri Jan 07 15:27:30 2011 +0000
+++ b/extras/mini-os/lib/math.c Fri Jan 07 16:48:27 2011 +0000
@@ -157,6 +157,8 @@ __qdivrem(uint64_t uq, uint64_t vq, uint
        int m, n, d, j, i;
        digit uspace[5], vspace[5], qspace[5];
+       memset(&tmp, 0, sizeof(tmp));
         * Take care of special cases: divide by zero, and u < v.

Xen-devel mailing list