NetBSD Problem Report #47130

From www@NetBSD.org  Fri Oct 26 09:59:36 2012
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
	by www.NetBSD.org (Postfix) with ESMTP id 20C6663E466
	for <gnats-bugs@gnats.NetBSD.org>; Fri, 26 Oct 2012 09:59:36 +0000 (UTC)
Message-Id: <20121026095935.437C563CA81@www.NetBSD.org>
Date: Fri, 26 Oct 2012 09:59:35 +0000 (UTC)
From: bartek@stobiecki.eu
Reply-To: bartek@stobiecki.eu
To: gnats-bugs@NetBSD.org
Subject: pkg_select doesn't compile in pkgsrc
X-Send-Pr-Version: www-1.0

>Number:         47130
>Category:       pkg
>Synopsis:       pkg_select doesn't compile in pkgsrc
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    imil
>State:          closed
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Fri Oct 26 10:00:09 +0000 2012
>Closed-Date:    Sat Dec 30 18:27:15 +0000 2017
>Last-Modified:  Sat Dec 30 18:27:15 +0000 2017
>Originator:     B.J. Stobiecki
>Release:        6.0
>Organization:
>Environment:
NetBSD net.omega.bsd 6.0 NetBSD 6.0 (GENERIC) amd64
>Description:
Program doesn't compile due to warnings which are treated as errors by default. The warning is:

"new qualifiers in middle of multi-level non-const cast are unsafe"

Which applies to install_many.c and pkgsrc.c sources.
>How-To-Repeat:
make in pkgtools/pkg_select
>Fix:
The following patches have helped:

--- pkgsrc.c    2009-03-08 14:25:53.000000000 +0000
+++ pkgsrc.c.fix        2012-10-26 11:36:15.000000000 +0000
@@ -80,7 +80,7 @@

        if ((list = build_mirror_list(method)) == NULL)
                return(NULL);
-       if ((etree = build_tree_from_list((const char **)list)) == NULL) {
+       if ((etree = build_tree_from_list((void*)list)) == NULL) {
                free_list(&list);
                return(NULL);
        }
@@ -247,7 +247,7 @@
        free_list(&list);

        if ((etree = 
-            build_tree_from_list((const char **)branchlist)) == NULL) {
+            build_tree_from_list((void*)branchlist)) == NULL) {
                free_list(&branchlist);
                return(NULL);
        }



--- install_many.c      2009-03-08 14:25:53.000000000 +0000
+++ install_many.c.fix  2012-10-26 11:35:40.000000000 +0000
@@ -199,7 +199,7 @@
                if ((list = build_list_from_slist()) == NULL)
                        goto out;
                if ((etree = 
-                    build_tree_from_list((const char **)list)) == NULL)
+                    build_tree_from_list((void*)list)) == NULL)
                        goto out;

                XFREE(resp);

>Release-Note:

>Audit-Trail:

Responsible-Changed-From-To: pkg-manager->imil
Responsible-Changed-By: wiz@NetBSD.org
Responsible-Changed-When: Fri, 26 Oct 2012 22:09:12 +0000
Responsible-Changed-Why:
Over to maintainer.


State-Changed-From-To: open->closed
State-Changed-By: bsiegert@NetBSD.org
State-Changed-When: Sat, 30 Dec 2017 18:27:15 +0000
State-Changed-Why:
A bunch of pkg_select bugs have just been fixed.


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(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.