From: Gianni Tedesco Subject: [PATCH]: minios: eliminate compile warning - use of uninitialised variable Date: Fri, 7 Jan 2011 16:52:49 +0000 Message-ID: <1294419169.12018.79.camel@qabil.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: Xen Devel Cc: Ian Jackson , Stefano Stabellini List-Id: xen-devel@lists.xenproject.org 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 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. */