Changeset

796:63f56696c66c

util.pposix: Fix incompatible pointer type compiler warnings
author Matthew Wild <mwild1@gmail.com>
date Fri, 13 Feb 2009 15:01:46 +0000
parents 795:e27a48e35bbb
children 797:6ea01e05b004
files util-src/pposix.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/util-src/pposix.c	Fri Feb 13 14:43:12 2009 +0000
+++ b/util-src/pposix.c	Fri Feb 13 15:01:46 2009 +0000
@@ -85,7 +85,8 @@
 
 /* Syslog support */
 
-char *facility_strings[] = 	{ 	"auth",
+const char * const facility_strings[] = {
+					"auth",
 					"authpriv",
 					"cron",
 					"daemon",
@@ -142,7 +143,7 @@
 
 int lc_syslog_open(lua_State* L)
 {
-	int facility = luaL_checkoption(L, 2, "daemon", &facility_strings);
+	int facility = luaL_checkoption(L, 2, "daemon", facility_strings);
 	facility = facility_constants[facility];
 
 	luaL_checkstring(L, 1);
@@ -156,7 +157,7 @@
 	return 0;
 }
 
-char *level_strings[] = 	{
+const char * const level_strings[] = {
 				"debug",
 				"info",
 				"notice",
@@ -174,7 +175,7 @@
 			};
 int lc_syslog_log(lua_State* L)
 {
-	int level = luaL_checkoption(L, 1, "notice", &level_strings);
+	int level = luaL_checkoption(L, 1, "notice", level_strings);
 	level = level_constants[level];
 
 	luaL_checkstring(L, 2);
@@ -196,7 +197,7 @@
 
 int lc_syslog_setmask(lua_State* L)
 {
-	int level_idx = luaL_checkoption(L, 1, "notice", &level_strings);
+	int level_idx = luaL_checkoption(L, 1, "notice", level_strings);
 	int mask = 0;
 	do
 	{