RPM Package Manager, CVS Repository http://rpm5.org/cvs/ ____________________________________________________________________________
Server: rpm5.org Name: Jeff Johnson Root: /v/rpm/cvs Email: [EMAIL PROTECTED] Module: lua Date: 12-Mar-2008 19:38:12 Branch: HEAD Handle: 2008031218381200 Modified files: lua/local lposix.c Log: - jbj: remove -W warnings. Summary: Revision Changes Path 1.9 +6 -3 lua/local/lposix.c ____________________________________________________________________________ patch -p0 <<'@@ .' Index: lua/local/lposix.c ============================================================================ $ cvs diff -u -r1.8 -r1.9 lposix.c --- lua/local/lposix.c 20 Jan 2008 11:29:49 -0000 1.8 +++ lua/local/lposix.c 12 Mar 2008 18:38:12 -0000 1.9 @@ -403,6 +403,7 @@ static void badoption(lua_State *L, /[EMAIL PROTECTED]@*/ int i, const char *what, int option) /[EMAIL PROTECTED] L @*/ { + i = i; /* XXX keep gcc happy. */ luaL_argerror(L, 2, lua_pushfstring(L, "unknown %s option `%c'", what, option)); } @@ -417,7 +418,7 @@ else if (lua_isstring(L, i)) { struct passwd *p=getpwnam(lua_tostring(L, i)); - return (p==NULL) ? -1 : p->pw_uid; + return (p==NULL) ? (uid_t)-1 : p->pw_uid; } else return luaL_typerror(L, i, "string or number"); @@ -433,7 +434,7 @@ else if (lua_isstring(L, i)) { struct group *g=getgrnam(lua_tostring(L, i)); - return (g==NULL) ? -1 : g->gr_gid; + return (g==NULL) ? (gid_t)-1 : g->gr_gid; } else return luaL_typerror(L, i, "string or number"); @@ -812,6 +813,7 @@ static int FgetID(lua_State *L, int i, /[EMAIL PROTECTED]@*/ const void *data) /[EMAIL PROTECTED] L @*/ { + data = data; /* XXX keep gcc happy. */ switch (i) { case 0: lua_pushnumber(L, getegid()); break; @@ -848,7 +850,7 @@ rc = glob(pattern, 0, NULL, &g); if (rc == 0) { lua_newtable(L); - for (i = 1; i <= g.gl_pathc; i++) + for (i = 1; i <= (int)g.gl_pathc; i++) storeindex(L, i, g.gl_pathv[i - 1]); globfree(&g); return 1; @@ -1132,6 +1134,7 @@ static int Fsysconf(lua_State *L, int i, /[EMAIL PROTECTED]@*/ const void *data) /[EMAIL PROTECTED] L @*/ { + data = data; /* XXX keep gcc happy. */ lua_pushnumber(L, sysconf(Ksysconf[i])); return 1; } @@ . ______________________________________________________________________ RPM Package Manager http://rpm5.org CVS Sources Repository rpm-cvs@rpm5.org