bugzilla-daemon@bugzilla.netfilter.org
2007-Feb-27 21:46 UTC
[Bug 551] New: gcc warning: assignment discards qualifiers from pointer target type
https://bugzilla.netfilter.org/bugzilla/show_bug.cgi?id=551 Summary: gcc warning: assignment discards qualifiers from pointer target type Product: ulogd Version: SVN (please provide t Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: ulogd AssignedTo: laforge@gnumonks.org ReportedBy: morfoh@opensde.org name is 'const char' but 'ulogd_logfile' is type 'char' which leads to a gcc compiler warning: assignment discards qualifiers from pointer target type src/ulogd.c: -----------snip-------------------------------------------------------------- 78 static char *ulogd_logfile = ULOGD_LOGFILE_DEFAULT; -----------snip-------------------------------------------------------------- 725 /* open the logfile */ 726 static int logfile_open(const char *name) 727 { 728 if (name) 729 ulogd_logfile = name; -----------snip-------------------------------------------------------------- Following patch seems to fix that issue: -----------snip-------------------------------------------------------------- --- ./src/ulogd.c.orig 2007-02-27 18:57:22.000000000 +0100 +++ ./src/ulogd.c 2007-02-27 18:58:00.000000000 +0100 @@ -75,7 +75,7 @@ /* global variables */ static FILE *logfile = NULL; /* logfile pointer */ static char *ulogd_configfile = ULOGD_CONFIGFILE; -static char *ulogd_logfile = ULOGD_LOGFILE_DEFAULT; +static const char *ulogd_logfile = ULOGD_LOGFILE_DEFAULT; static FILE syslog_dummy; /* linked list for all registered plugins */ -----------snip-------------------------------------------------------------- -- Configure bugmail: https://bugzilla.netfilter.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee.
Reasonably Related Threads
- [Bug 551] gcc warning: assignment discards qualifiers from pointer target type
- [Bug 550] New: building ulogd2 fails due to missing 'autoheader' in autogen.sh
- [Bug 550] building ulogd2 fails due to missing 'autoheader' in autogen.sh
- [Bug 741] New: ULOGD segfaults on init
- [Bug 665] Can't start error opening /var/log/ ...