NetBSD Problem Report #38767

From martin@duskware.de  Tue May 27 10:07:13 2008
Return-Path: <martin@duskware.de>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by narn.NetBSD.org (Postfix) with ESMTP id 79C0063B8BC
	for <gnats-bugs@gnats.netbsd.org>; Tue, 27 May 2008 10:07:13 +0000 (UTC)
Message-Id: <20080527100636.8554B63B8BC@narn.NetBSD.org>
Date: Tue, 27 May 2008 10:06:36 +0000 (UTC)
From: murray@river-styx.org
Reply-To: murray@river-styx.org
To: netbsd-bugs-owner@NetBSD.org
Subject: make src/lib/csu WARNS=4 pass
X-Send-Pr-Version: www-1.0

>Number:         38767
>Category:       lib
>Synopsis:       make src/lib/csu WARNS=4 pass
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    lib-bug-people
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Tue May 27 10:10:00 +0000 2008
>Closed-Date:    Sat Dec 31 05:01:41 +0000 2022
>Last-Modified:  Sat Dec 31 05:01:41 +0000 2022
>Originator:     murray armfield
>Release:        NetBSD-current
>Organization:
N/A
>Environment:
NetBSD zeus.river-styx.org 4.99.63 NetBSD 4.99.63 (ZEUS) #0: Tue May 27 14:32:01 EST 2008  admin@zeus.river-styx.org:/vol01/build/obj/sys/arch/amd64/compile/ZEUS amd64
>Description:
The compilation of /src/lib/csu fails with WARNS=4 under amd64 because of one line in src/lib/csu/common_elf/common.h which initialises __progname to an empty string.

Considering each platform sets this variable at the start of program execution, isn't it safe to drop the assignment, and then csu passes WARNS=4 on amd64. Haven't checked other ports, don't have other ports available.
>How-To-Repeat:
Add a Makefile.inc in the src/lib/csu directory and set WARNS=4 and build.
>Fix:
Index: common.h
===================================================================
RCS file: /cvsroot/src/lib/csu/common_elf/common.h,v
retrieving revision 1.12
diff -u -u -p -r1.12 common.h
--- common.h    18 May 2006 17:54:19 -0000      1.12
+++ common.h    27 May 2008 09:51:04 -0000
@@ -66,7 +66,7 @@ do {                                          \
 static char    *_strrchr(char *, int);

 char   **environ;
-char   *__progname = "";
+char   *__progname;
 struct ps_strings *__ps_strings = 0;

 extern void    _init(void);

>Release-Note:

>Audit-Trail:

State-Changed-From-To: open->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Sat, 31 Dec 2022 05:01:41 +0000
State-Changed-Why:
this seems to have been fixed sometime in the past 14 years


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: gnats-precook-prs,v 1.4 2018/12/21 14:20:20 maya Exp $
$NetBSD: gnats_config.sh,v 1.9 2014/08/02 14:16:04 spz Exp $
Copyright © 1994-2017 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.