NetBSD Problem Report #51329
From gson@gson.org Sat Jul 9 13:17:46 2016
Return-Path: <gson@gson.org>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id E6E3D7A2B2
for <gnats-bugs@gnats.NetBSD.org>; Sat, 9 Jul 2016 13:17:46 +0000 (UTC)
Message-Id: <20160709131740.E3A5874466B@guava.gson.org>
Date: Sat, 9 Jul 2016 16:17:40 +0300 (EEST)
From: gson@gson.org (Andreas Gustafsson)
Reply-To: gson@gson.org (Andreas Gustafsson)
To: gnats-bugs@NetBSD.org
Subject: xentools45 does not build on NetBSD-current
X-Send-Pr-Version: 3.95
>Number: 51329
>Category: pkg
>Synopsis: xentools45 does not build on NetBSD-current
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: pkg-manager
>State: closed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Jul 09 13:20:00 +0000 2016
>Closed-Date: Mon Sep 12 18:10:55 +0000 2016
>Last-Modified: Mon Sep 12 18:10:55 +0000 2016
>Originator: Andreas Gustafsson
>Release: NetBSD-current, source date 2016.07.08.09.15.38
>Organization:
>Environment:
System: NetBSD
Architecture: x86_64
Machine: amd64
>Description:
When I try to build the xentools45 package from the current pkgsrc on
a NetBSD-current/amd64 system (CVS source date 2016.07.08.09.15.38),
compilation fails with the following error message:
xenpaging.c: In function 'main':
xenpaging.c:193:10: error: 'buffer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
if ( mlock(buffer, PAGE_SIZE) < 0 )
^
xenpaging.c:185:11: note: 'buffer' was declared here
void *buffer;
^
cc1: all warnings being treated as errors
gmake[2]: *** [/usr/pkgsrc/sysutils/xentools45/work/xen-4.5.3/tools/xenpaging/../../tools/Rules.mk:100: xenpaging.o] Error 1
>How-To-Repeat:
>Fix:
>Release-Note:
>Audit-Trail:
From: Andreas Gustafsson <gson@gson.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: pkg/51329: xentools45 does not build on NetBSD-current
Date: Sun, 10 Jul 2016 11:31:13 +0300
For the record, xentools46 does compile on the same host system.
--
Andreas Gustafsson, gson@gson.org
From: coypu@SDF.ORG
To: gnats-bugs@netbsd.org
Cc:
Subject: Re: pkg/51329: xentools45 does not build on NetBSD-current
Date: Mon, 12 Sep 2016 15:26:14 +0000
Looks like spz added a patch:
$NetBSD: patch-xenpaging_xenpaging.c,v 1.1 2016/08/06 12:41:36 spz Exp $
--- xenpaging/xenpaging.c.orig 2016-03-23 13:57:27.000000000 +0000
+++ xenpaging/xenpaging.c
@@ -184,6 +184,9 @@ static void *init_page(void)
{
void *buffer;
+ buffer = NULL; /* shut up compiler about uninitialized use:
+ * posix_memalign initializes it */
+
/* Allocated page memory */
errno = posix_memalign(&buffer, PAGE_SIZE, PAGE_SIZE);
if ( errno != 0 )
State-Changed-From-To: open->closed
State-Changed-By: gson@NetBSD.org
State-Changed-When: Mon, 12 Sep 2016 18:10:55 +0000
State-Changed-Why:
Retested and it works now. Thanks.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.