From nobody Sat Apr 11 15:49:12 2026 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4ftJ4n4yfjz6Ygqy for ; Sat, 11 Apr 2026 15:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R12" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 4ftJ4n196Fz3Hhd for ; Sat, 11 Apr 2026 15:49:13 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775922553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLtG8LWAygPadJFC4fjA+w08JMK7n+Anv3lsZxU7f3E=; b=u5iJRj3hsb194oHw5Nwm7xh9athiak05VGBfmSBmjNg7S8NkO+fFk4m8ds5OAE9nsASxSg RqPAHn7Sf8WAcHGyW3DO26eeZgzP7EdDtxBbuQxSgAS6qR6RG8/eHM81TGl0zMw07LKIB1 fmPjWXwl5IiZtqLfmtTVA07JysVNE2Qc8lS3rGBkss2EVJAybuG3md84XYGS3fFVest77Z UGp2J6posaEpCrWpGQy00hg+u6HqZXF7r4RPg/UcWaohyeNmqbTL9pdfNnjM/CeOqnxBQA IaVC5CvaF8uUIDha2xiNWm0tnDbdRfX0qVuD6lkwIW9MDbj/XRjIyDFPnFzDjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1775922553; a=rsa-sha256; cv=none; b=HvrNGhnzCqSDlpvqKCrSdojUsXY7kIRPE+EKzy7L1E/0e8ZQc2yB4K4ukHs9kqNXsviUhb vr5UE7/UzSlbXHZvI488S4lpw0PdLKOVF2jayU8pE34kDKNWS1VzS+Tl4BqKGSRlb9UzNp taUJGr1bTFNzmoIEI/jxk8ajFHyhVxeNFjesDrpsn7xTrgs03HNrqzBwp8BJ3dWQeZQ6or /7lo/xr7d2EeeLI7xHttB3CxC9oL3P5TaILnoB5ZpWXpAiG1ns5gUdWYLlwZ0Wb9xhdYrQ Maebv85C8Ma4jDYdK8sbRU0SHjrCJgCN+Fa+vHPIr20Lhz/o0BPxpaFYOX1zwA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1775922553; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=nLtG8LWAygPadJFC4fjA+w08JMK7n+Anv3lsZxU7f3E=; b=IHX86QlXdkrcs5nBJZSagVY69BAuMj4ImdaIyNbQ4x1k4SzUBB3abBrjwimyjyN0CC2KMV zeiMiuiDLEORzGaRPzaVwxMHLJDYzqx2mdAEie1X4rc+frFSaAxdYRrt3GFj2eCn7QbVTX QOMf7MJ15g0cGwXtnPPzkZo1WJgtn3AUFjLgfIwi6/m6j1/PsVJS6qoIT3lwiE4nNLJ478 jhvPGDSBv0GPS6TSBliAcJI5DOnJfOZDeA9Axhkeqz5KDUwovTXFOnTRpqFPXM0w618GyM uHBgDPUWG3HK01iWOMPPgjlIv6UVnN5ZEH2ZQwn50DICb5AiIqcfu6pJbdyLDw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4ftJ4m6rl8zd9M for ; Sat, 11 Apr 2026 15:49:12 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 2037b by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Sat, 11 Apr 2026 15:49:12 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Kyle Evans Subject: git: ec37fd5422b8 - stable/15 - flua: lposix: fix WARNS=6 issues List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/stable/15 X-Git-Reftype: branch X-Git-Commit: ec37fd5422b8d5704110b4d1a0bb5a398c1bc05f Auto-Submitted: auto-generated Date: Sat, 11 Apr 2026 15:49:12 +0000 Message-Id: <69da6d78.2037b.77b42f4d@gitrepo.freebsd.org> The branch stable/15 has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=ec37fd5422b8d5704110b4d1a0bb5a398c1bc05f commit ec37fd5422b8d5704110b4d1a0bb5a398c1bc05f Author: Kyle Evans AuthorDate: 2026-01-28 15:37:04 +0000 Commit: Kyle Evans CommitDate: 2026-04-11 03:18:47 +0000 flua: lposix: fix WARNS=6 issues lposix is the last holdout of modules built into flua until we can fix the module design to have the right parts require()able. Address a valid bug in lua_read() found at a higher WARNS and drop the override entirely. Some of the modules could possibly be re-evaluated. Reported by: des Reviewed by: des Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. (cherry picked from commit b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5) --- libexec/flua/Makefile | 1 - libexec/flua/modules/lposix.c | 12 ++++++++---- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/libexec/flua/Makefile b/libexec/flua/Makefile index f1c46b270ded..c40328d37963 100644 --- a/libexec/flua/Makefile +++ b/libexec/flua/Makefile @@ -44,7 +44,6 @@ LUASRC?= ${SRCTOP}/contrib/lua/src .PATH: ${LUASRC} PROG= flua -WARNS?= 3 CWARNFLAGS.gcc+= -Wno-format-nonliteral diff --git a/libexec/flua/modules/lposix.c b/libexec/flua/modules/lposix.c index 75cdd345aeaa..a25e875045a2 100644 --- a/libexec/flua/modules/lposix.c +++ b/libexec/flua/modules/lposix.c @@ -8,6 +8,7 @@ #include #include +#include #include #include #include @@ -254,7 +255,7 @@ lua_execp(lua_State *L) } argv[argc + 1] = NULL; - execvp(file, (char **)argv); + execvp(file, __DECONST(char **, argv)); error = errno; lua_pushnil(L); @@ -386,7 +387,7 @@ lua_read(lua_State *L) char *buf; ssize_t ret; size_t sz; - int error, fd; + int error = 0, fd; enforce_max_args(L, 2); fd = luaL_checkinteger(L, 1); @@ -398,8 +399,10 @@ lua_read(lua_State *L) } buf = malloc(sz); - if (buf == NULL) + if (buf == NULL) { + error = errno; goto err; + } /* * For 0-byte reads, we'll still push the empty string and let the @@ -412,12 +415,13 @@ lua_read(lua_State *L) error = errno; /* Save to avoid clobber by free() */ free(buf); - if (error != 0) + if (ret < 0) goto err; /* Just the string pushed. */ return (1); err: + assert(error != 0); lua_pushnil(L); lua_pushstring(L, strerror(error)); lua_pushinteger(L, error);