[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#84152: marked as done (<sys/syslog.h> initializes char *'s with string constants)

Your message dated Thu, 29 Jan 2004 08:13:40 -0800
with message-id <20040129161339.GB32297@marge.v3.ca>
and subject line Closing this bug
has caused the attached Bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Debian bug tracking system administrator
(administrator, Debian Bugs database)

Received: (at submit) by bugs.debian.org; 30 Jan 2001 16:32:54 +0000
>From jtv@cistron-office.nl Tue Jan 30 10:32:54 2001
Return-path: <jtv@cistron-office.nl>
Received: from janeway.cistron.net [::ffff:] 
	by master.debian.org with esmtp (Exim 3.12 1 (Debian))
	id 14Ndi7-0005P2-00; Tue, 30 Jan 2001 10:32:52 -0600
Received: from slipstream.cistron-office.nl (jtv@slipstream.cistron-office.nl [])
	by janeway.cistron.net (8.9.3/8.9.3/Debian 8.9.3-6) with SMTP id RAA26479;
	Tue, 30 Jan 2001 17:32:46 +0100
Message-Id: <200101301632.RAA26479@janeway.cistron.net>
Received: by slipstream.cistron-office.nl (sSMTP sendmail emulation); Tue, 30 Jan 2001 17:32:45 +0100
From: "J. T. Vermeulen" <jtv@cistron-office.nl>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: <sys/syslog.h> initializes char *'s with string constants
X-Reportbug-Version: 1.9
X-Mailer: reportbug 1.9
Date: Tue, 30 Jan 2001 17:32:45 +0100
Delivered-To: submit@bugs.debian.org

Package: libc6-dev
Version: 2.2-6
Severity: minor

When SYSLOG_NAMES is #define'd, <sys/syslog.h> defines:

typedef struct _code {
    char      *c_name;
    int     c_val;

...and then proceeds to define two arrays of these structs, where the c_name
fields are initialized with string constants.  Which is not OK by gcc's
-Wwrite-strings option, obviously.

Suggest changing definition to:

typedef struct _code {
    const char      *c_name;
    int     c_val;

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux slipstream 2.2.18pre17 #1 Fri Oct 27 16:55:29 CEST 2000 i686

Versions of packages libc6-dev depends on:
ii  libc6                         2.2-6      GNU C Library: Shared libraries an

Received: (at 84152-done) by bugs.debian.org; 29 Jan 2004 16:14:27 +0000
>From jbailey@nisa.net Thu Jan 29 08:14:27 2004
Return-path: <jbailey@nisa.net>
Received: from marge.v3.ca [] 
	by spohr.debian.org with esmtp (Exim 3.35 1 (Debian))
	id 1AmEoF-00012W-00; Thu, 29 Jan 2004 08:14:27 -0800
Received: from marge.v3.ca (localhost [])
	by marge.v3.ca (8.12.11.Beta0/8.12.11.Beta0/Debian-1) with ESMTP id i0TGDu25011494
	(version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO)
	for <84152-done@bugs.debian.org>; Thu, 29 Jan 2004 08:13:56 -0800
Received: (from jbailey@localhost)
	by marge.v3.ca (8.12.11.Beta0/8.12.10/Debian-0) id i0TGDeOV011462
	for 84152-done@bugs.debian.org; Thu, 29 Jan 2004 08:13:40 -0800
X-Authentication-Warning: marge.v3.ca: jbailey set sender to jbailey@nisa.net using -f
Date: Thu, 29 Jan 2004 08:13:40 -0800
From: Jeff Bailey <jbailey@nisa.net>
To: 84152-done@bugs.debian.org
Subject: Closing this bug
Message-ID: <20040129161339.GB32297@marge.v3.ca>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
X-EMSscan-MailScanner: Found to be clean
X-EMSscan-MailScanner-SpamCheck: not spam, SpamAssassin (score=-9.009,
	required 5, BAYES_00 -4.90, USER_AGENT_MUTT -4.11)
Delivered-To: 84152-done@bugs.debian.org
X-Spam-Checker-Version: SpamAssassin 2.60-bugs.debian.org_2004_01_27 
	(1.212-2003-09-23-exp) on spohr.debian.org
X-Spam-Status: No, hits=0.0 required=4.0 tests=none autolearn=no 

I'm using the following test case:

#include <stdio.h>
#include <sys/syslog.h>
static int a = 1;

Compiled with:

gcc -W -Wall -Wwrite-strings main.c

And I cannot reproduce this bug.  I'm going to assume that it's been
fixed in the last 3 years.  If this isn't the case, please feel free to
reopen this bug, but I'll need you to attach a testcase.

Jeff Bailey

Reply to: