# HG changeset patch # User Matthew Wild # Date 1234537306 0 # Node ID 63f56696c66c1dcf1bd6b541035044d29bfcb3fc # Parent e27a48e35bbb3c4ce986b00970035ffd9beae818 util.pposix: Fix incompatible pointer type compiler warnings diff -r e27a48e35bbb -r 63f56696c66c util-src/pposix.c --- 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 {