From d58bed053e057705b621d139f386f69782bd0da0 Mon Sep 17 00:00:00 2001 From: hanez Date: Thu, 15 Jan 2026 23:07:24 +0100 Subject: [PATCH] FreeBSD build warning fix. (0.37.56) --- CMakeLists.txt | 2 +- src/repl.c | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index f8ef705..1056b9d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/src/repl.c b/src/repl.c index 613f0ea..81ebcef 100644 --- a/src/repl.c +++ b/src/repl.c @@ -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;