mirror of
https://github.com/jart/cosmopolitan.git
synced 2025-05-27 15:52:28 +00:00
Fix warnings
This change fixes Cosmopolitan so it has fewer opinions about compiler warnings. The whole repository had to be cleaned up to be buildable in -Werror -Wall mode. This lets us benefit from things like strict const checking. Some actual bugs might have been caught too.
This commit is contained in:
parent
e2b3c3618e
commit
0d748ad58e
571 changed files with 1306 additions and 1888 deletions
6
third_party/lua/lrepl.c
vendored
6
third_party/lua/lrepl.c
vendored
|
@ -73,7 +73,7 @@ linenoiseCompletionCallback *lua_repl_completions_callback;
|
|||
struct linenoiseState *lua_repl_linenoise;
|
||||
const char *lua_progname;
|
||||
static lua_State *globalL;
|
||||
static const char *g_historypath;
|
||||
static char *g_historypath;
|
||||
|
||||
/*
|
||||
** {==================================================================
|
||||
|
@ -105,8 +105,9 @@ void lua_readline_completions (const char *p, linenoiseCompletions *c) {
|
|||
size_t n;
|
||||
bool found;
|
||||
lua_State *L;
|
||||
const char *a;
|
||||
const char *name;
|
||||
char *a, *b, *s, *component;
|
||||
char *b, *s, *component;
|
||||
|
||||
// start searching globals
|
||||
L = globalL;
|
||||
|
@ -318,7 +319,6 @@ static void lstop (lua_State *L, lua_Debug *ar) {
|
|||
static int multiline (lua_State *L) {
|
||||
for (;;) { /* repeat until gets a complete statement */
|
||||
size_t len;
|
||||
ssize_t rc;
|
||||
const char *line = lua_tolstring(L, 1, &len); /* get what it has */
|
||||
int status = luaL_loadbuffer(L, line, len, "=stdin"); /* try it */
|
||||
if (!incomplete(L, status) || pushline(L, 0) != 1)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue