Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170816091837.10436-1-vda.linux@googlemail.com>
Date: Wed, 16 Aug 2017 11:18:37 +0200
From: Denys Vlasenko <vda.linux@...glemail.com>
To: Rich Felker <dalias@...c.org>
Cc: Denys Vlasenko <vda.linux@...glemail.com>,
	musl@...ts.openwall.com
Subject: [PATCH] syslog.h: fix warning "initialization discards 'const' qualifier from pointer target type"

This happens when syslog.h is included with "#define SYSLOG_NAMES 1"

Signed-off-by: Denys Vlasenko <vda.linux@...glemail.com>
CC: musl@...ts.openwall.com
---
 include/syslog.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/syslog.h b/include/syslog.h
index 5b4d296..25eb3e4 100644
--- a/include/syslog.h
+++ b/include/syslog.h
@@ -70,7 +70,7 @@ void vsyslog (int, const char *, va_list);
 #define	INTERNAL_NOPRI 0x10
 #define	INTERNAL_MARK (LOG_NFACILITIES<<3)
 typedef struct {
-	char *c_name;
+	const char *c_name;
 	int c_val;
 } CODE;
 #define prioritynames ((CODE *)(const CODE []){ \
-- 
2.9.2

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.