From nobody Wed Jan 28 15:43:37 2026 X-Original-To: dev-commits-src-main@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 4f1RQ21dGrz6QG8r for ; Wed, 28 Jan 2026 15:43:38 +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 "R13" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4f1RQ20qcNz3HVt for ; Wed, 28 Jan 2026 15:43:38 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769615018; 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=+1TzeP13we63xKg3ogF5KKLa52ZyPodN4MrTv6SZmvE=; b=D8z3yIHB7y/zQVmcL7mkbSBZG4J2kVibEjJ2B+KyUSLIeyGrIAb39Y6JQaEApWz3bs7ExB jn8P1uhisOJontgzzTldO8lUJp/q6VVLGYel0aPZcU5WHbamCmg4qwq0PTs/WRPPZRBf49 jVwVxP269EEV1XK7ujZcb+zV+amsqr2PNLdocPUNq731bd4Ojw9w3ap15Xbdcsga4MMfzr wvHmpJnkmSqWZZqkt81vaaSfQvds35dUPS1+/LyCTkUpv27FUsNo19T1a6I7aBdlehdK9m 8GlyGkJiURV06AmSp6fLMU8BqWL+HPzZ/vTJ5wwlBuGqRfCymam49OYmlvNWjg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1769615018; 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=+1TzeP13we63xKg3ogF5KKLa52ZyPodN4MrTv6SZmvE=; b=RAhgV5Ms4ePMdddUr0818i/6Q4MvRBr9kNDCMKB55rRLF56iO75UO6UpL2ZTgQpzIN9tKS lkw0dNAmam5lidEooFB6Ovin4vwv0qmwIxgk+B3rdEyzd/1jsLLOG8jpJmuJ/Eybl2P/+P WVqfmndORGCVcDLCiFsrtaEO6MyAaKr+G3sOG8A8EJyBYVzMYem8zv3Qug9hOwHAvTI9xY CvrVhWxA+/z2fQN8nxETvUexlqEQV+3LqOhfnZZeWzoRJ4BtCNPmPYCYmrBuCdnmCgSPB1 V1Iwi817WJNYcfmf5u12xk5B8c0PxqA91IU5JNVvjv6GACWu9EhPcOt0LXqFxA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1769615018; a=rsa-sha256; cv=none; b=f0qICD+OQ7M8P29AeiteDHIQOpYpx1UUjx04fHYlpKIIyu7hclo22VHmuyeEvbNjJ4imIN bn55dxWOtln/KocyPoQBJC+KIvO/6AOPSk8/jVByYd6nwQvv/Q9VQONQM0S09jSIPaYW3j LSPI+xIEbPgwde+Ec6ipkxcK5wnm7ZSy3HNtjpmxKd39IVLOAH5BfyLMO/2KhvS9hmQgyZ nZjnhF0WE2RRlYaZw+xFweMvHVzizuYbiB4e5FG/Oqx5HC1rPh1fXqyVK4QRhQUx/DoStZ cTGwTU2kMRL+yBl2rwu3RaTxydKqxXdZqeKQQLCyKjUF1ZXnShSO+bEKpCW7iA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) by mxrelay.nyi.freebsd.org (Postfix) with ESMTP id 4f1RQ202J5zyG2 for ; Wed, 28 Jan 2026 15:43:37 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 34937 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 28 Jan 2026 15:43:37 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: b41b6fdb3a16 - main - flua: lposix: fix WARNS=6 issues List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5 Auto-Submitted: auto-generated Date: Wed, 28 Jan 2026 15:43:37 +0000 Message-Id: <697a2ea9.34937.21f8aea3@gitrepo.freebsd.org> The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5 commit b41b6fdb3a1635de4c2a9280aab12b83e3aeffc5 Author: Kyle Evans AuthorDate: 2026-01-28 15:37:04 +0000 Commit: Kyle Evans CommitDate: 2026-01-28 15:43:14 +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. Fixes: c2caf3b3313 ("flua: lposix: add more useful functions [...]") Reported by: des Reviewed by: des Sponsored by: Klara, Inc. Sponsored by: NetApp, Inc. --- 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);