From nobody Mon Oct 28 17:35:18 2024 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 4XcgWq0Bqlz5bZc1; Mon, 28 Oct 2024 17:35:19 +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 "R10" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4XcgWp6pcPz4J3C; Mon, 28 Oct 2024 17:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730136919; 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=EyIHKbGTzuUR6/1Sul7XvmQbXmTXL5NVXc9GvgypRPQ=; b=dASCv6O6Xg6tPx3JT11WFzz7GKOsDLOGjYhiRunREVQ3e2ZeF5dLH7dmREdsMKFF57S12Y SEEdOa9zyWIHjfvABQJm1an/Yk8HwhNXl7vNSkcHfp2XU1xjPrwcaUyXEhjHVWahcBy0iI 3tvAbZIYD4UUyMY5tsZ3T/ZE8v6jLQo0WsEa6JvBM57uCoAM4OkZCqextypvS9w5lnVKiJ XkZ3fEx6cdL2SA2bcal2E4VWpVatovR0KP4ojwvZpwpeoOwbTZ4B/lwZFPOwhgIf56/ecw jSRUUTnc96xE0p/uXWeQa13uMnIBc9fI/5rjjee+8xE4xnBZmIY5tseGLy/GTw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1730136919; 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=EyIHKbGTzuUR6/1Sul7XvmQbXmTXL5NVXc9GvgypRPQ=; b=U0g+TFWnHuY8K2l2lMpDW8WkwFSHW642XK1bhfzTOqVCsMCrPtTKx1s0Fso6GRep97ifKg JPwirkwhMzNBP2ISbTYfnXMJWmPZTzEWjYoBbJ7JW0lup0a1B8j6RvnthFtiW4ZomszDI6 TMXFNHZ4jCmcoWP/MJdNOg4Z6Pja5KD0MW1Pa1ZpTTYJxW/Ptg7o0wZhdI+FKCsveyvZFF ksIcvKhkroDwCye1HXD0XflmaHtYaXLRPma69fR+YVoOD0kcJBTg3rj+SwgDaHFwni3z2u vXo4+NGcW8RSh06zIHGOECCQZRbD1+l+DW92oBVHYT350DlKV1A8tsXYIYIb1Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1730136919; a=rsa-sha256; cv=none; b=GoiphwZwsHKRVonbU/jIQ6H6n09c7kQdsdvhP0K9bu+fKxO+bMEMyQQVCwoCI+K4IzWFfb MVvhK2GE97rAaW4i+X9R+nl545BvyX/NzrI/twfF/zmM5hq99d52HLc5CXpjDEHlnM2LLG h57qZYtIEH+9ILimJjx1IsPvXmYvN/ko6WFK0OHkZLnVruiq+6NKg56uuyU5sYy/gMUJ64 OPoDXbqDVEhHFo8YtY8HgurBWD83yhv2duaF9ueQM4DwT0JjOuq/ABCgDRarEnY70jdVw4 6f9+T3mcMvxo4rgfY4qemX9UBj/PfTMUrGXD3Ki5OUnfK9uuNI0aWGhKdlhtTA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (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 did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4XcgWp6PlkzpFj; Mon, 28 Oct 2024 17:35:18 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 49SHZIM6012744; Mon, 28 Oct 2024 17:35:18 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 49SHZIG1012741; Mon, 28 Oct 2024 17:35:18 GMT (envelope-from git) Date: Mon, 28 Oct 2024 17:35:18 GMT Message-Id: <202410281735.49SHZIG1012741@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: b8c3dd46bba0 - main - Fix gcc unused value warnings in FreeBSD zfs_prop.c 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: dim X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b8c3dd46bba0451cfecf2fcfbc6aff0459a487bd Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=b8c3dd46bba0451cfecf2fcfbc6aff0459a487bd commit b8c3dd46bba0451cfecf2fcfbc6aff0459a487bd Author: Dimitry Andric AuthorDate: 2024-10-27 14:15:54 +0000 Commit: Dimitry Andric CommitDate: 2024-10-28 17:34:58 +0000 Fix gcc unused value warnings in FreeBSD zfs_prop.c With gcc we are seeing the following -Werror warnings: /workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:53:33: error: statement with no effect [-Werror=unused-value] 53 | #define simd_stat_init() 0 | ^ /workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1092:9: note: in expansion of macro 'simd_stat_init' 1092 | simd_stat_init(); | ^~~~~~~~~~~~~~ /workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c: In function 'zcommon_fini': /workspace/src/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h:54:33: error: statement with no effect [-Werror=unused-value] 54 | #define simd_stat_fini() 0 | ^ /workspace/src/sys/contrib/openzfs/module/zcommon/zfs_prop.c:1100:9: note: in expansion of macro 'simd_stat_fini' 1100 | simd_stat_fini(); | ^~~~~~~~~~~~~~ Both `simd_stat_init()` and `simd_stat_fini()` are defined in the FreeBSD specific version of `simd.h`: #define simd_stat_init() 0 #define simd_stat_fini() 0 These should both be defined as `do {} while (0)` instead, similar to other macros in this file. Reviewed by: mav, tsoome (upstream) Obtained from: https://github.com/openzfs/zfs/pull/16693 MFC after: 3 days Differential Revision: --- sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h index 6bc46755c4e3..d16e1db5e826 100644 --- a/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h +++ b/sys/contrib/openzfs/include/os/freebsd/spl/sys/simd.h @@ -50,7 +50,7 @@ #define kfpu_fini() do {} while (0) #endif -#define simd_stat_init() 0 -#define simd_stat_fini() 0 +#define simd_stat_init() do {} while (0) +#define simd_stat_fini() do {} while (0) #endif