Bug 27492

Summary: syslog.h fails to compile with -Wwrite-strings
Product: Base System Reporter: avn <avn>
Component: miscAssignee: dwmalone
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 4.3-STABLE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description avn 2001-05-21 10:30:02 UTC

How-To-Repeat: $cat > a.c
#define SYSLOG_NAMES
#include <stdio.h>
#include <syslog.h>
int main(void) {return 0;}
^D
$gcc -Wwrite-strings -Werror a.c
In file included from a.c:3:
/usr/include/syslog.h:76: warning: initialization discards qualifiers from point
er target type
[ ... many more warnings skipped ... ]
Comment 1 dwmalone freebsd_committer freebsd_triage 2001-05-21 10:36:53 UTC
Responsible Changed
From-To: freebsd-bugs->dwmalone

I'll have a look at this. I'll have to check what the knock on effects are.
Comment 2 Peter Pentchev 2001-05-21 10:41:25 UTC
On Mon, May 21, 2001 at 02:37:56AM -0700, dwmalone@FreeBSD.org wrote:
> Synopsis: syslog.h fails to compile with -Wwrite-strings
> 
> Responsible-Changed-From-To: freebsd-bugs->dwmalone
> Responsible-Changed-By: dwmalone
> Responsible-Changed-When: Mon May 21 02:36:53 PDT 2001
> Responsible-Changed-Why: 
> I'll have a look at this. I'll have to check what the knock on effects are.

I have been running with a similar patch for the last month or three.
No side effects have occurred so far - I think nobody (or no program ;)
in their right mind would actually try to modify the fac/pri names anyway :)

G'luck,
Peter

-- 
I am the meaning of this sentence.
Comment 3 Poul-Henning Kamp freebsd_committer freebsd_triage 2001-05-21 18:32:55 UTC
State Changed
From-To: open->closed

committed, thanks!
Comment 4 dwmalone freebsd_committer freebsd_triage 2001-05-21 19:43:40 UTC
State Changed
From-To: closed->open

I think this may cause knock-on constness warnings in syslogd, 
libwrap and friends. I'm reopening the PR to remind myself to do 
this.
Comment 5 dwmalone freebsd_committer freebsd_triage 2001-05-29 14:18:01 UTC
State Changed
From-To: open->closed

Patch now in -current and -stable. Thanks!