ref: b37dab87f613694f572f07081f7d5cf5528db9e1
parent: e9216d892affa488807f5401c976ae6e1b83ca65
author: kvik <[email protected]>
date: Mon Feb 22 20:40:24 EST 2021
los9lib: fix compiler warnings
--- a/los9lib.c
+++ b/los9lib.c
@@ -17,7 +17,7 @@
static int
os_exit(lua_State *L){
- char *status;
+ const char *status;
status = nil;
switch(lua_type(L, 1)){
@@ -40,7 +40,7 @@
static int
os_execute(lua_State *L)
{
- char *cmd;
+ const char *cmd;
Waitmsg *w;
cmd = luaL_optstring(L, 1, nil);
@@ -79,7 +79,7 @@
static int
os_remove(lua_State *L){
char err[ERRMAX];
- char *file;
+ const char *file;
file = luaL_checkstring(L, 1);
if(remove(file) == -1){
@@ -250,7 +250,7 @@
}
static char*
-datefmt1(lua_State *L, char **sp, Tm *tm)
+datefmt1(lua_State *, char **sp, Tm *tm)
{
char *s, mod;
Fmt f;
@@ -257,6 +257,7 @@
fmtstrinit(&f);
s = *sp;
+ mod = 0;
if(s[0] == 'E' || s[0] == '0'){
mod = s[0];
s++;
@@ -334,7 +335,7 @@
static int
os_date(lua_State *L)
{
- char *fmt;
+ const char *fmt;
size_t fmtlen;
vlong t;
Tm tm, *tp;