1
0
Fork 0
forked from fun/fun

FreeBSD build warning fix. (0.37.56)

This commit is contained in:
Johannes Findeisen 2026-01-15 23:07:24 +01:00
commit d58bed053e
2 changed files with 4 additions and 2 deletions

View file

@ -1,5 +1,5 @@
cmake_minimum_required(VERSION 3.10)
project(fun VERSION 0.37.55 LANGUAGES C)
project(fun VERSION 0.37.56 LANGUAGES C)
set(CMAKE_C_STANDARD 99)
set(CMAKE_C_STANDARD_REQUIRED ON)

View file

@ -1138,7 +1138,9 @@ int fun_run_repl(VM *vm) {
continue;
} else if (cmd_is_one_of(cmd, (const char*[]){"run","ru","profile","pf", NULL})) {
int is_profile = cmd_is_one_of(cmd, (const char*[]){"profile","pf", NULL});
int from_file = (arg && arg[0] != '\0');
// 'arg' is a fixed-size local array, so its address is always non-null.
// Only check whether it contains a non-empty string.
int from_file = (arg[0] != '\0');
const char *src = NULL;
char *filebuf = NULL;