From nobody Wed Apr 27 13:30:17 2022 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 9E18A1AB490C; Wed, 27 Apr 2022 13:30:17 +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 "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KpKPP42jBz4nrB; Wed, 27 Apr 2022 13:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651066217; 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=lC3R/ti11lM/e7UXZgFW8VcYb0RDg3szZ/020L/sxqk=; b=sTDwxyN9M1j5I1RdnFlb9Die/qD0JMBbsMAyHHE5cS5L8yigNSYl/JP1/4cKVAd4kx2Npe m67qiH/dLUoGca9+SChBYA4hfnVRJj/6/GFpe/jYGDDHvYgnBeVoRS3Vt1fOOTSWa7SheM AoIXi6ACGff7x0hGnkNPUf2eBc3xhERZbMlBjefJ5AzpUjF/+p5M3J+vqXcH+mlv3b/ho8 nSl+AI2ZfMy01PST4Fi500H68DkOomRB1/Lw0b1kLubugUK1w19YXuHcWZQAidJzo5mouz yf4ByDwgaXD/IOk7xnWF+z8atHdtiyHMnJZ4YMUccCQCy9N8HZ/VjlIo65nC+A== 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 6A56724B17; Wed, 27 Apr 2022 13:30:17 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23RDUH4f063647; Wed, 27 Apr 2022 13:30:17 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23RDUHwN063641; Wed, 27 Apr 2022 13:30:17 GMT (envelope-from git) Date: Wed, 27 Apr 2022 13:30:17 GMT Message-Id: <202204271330.23RDUHwN063641@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Guzik Subject: git: b40c0db6f6d6 - main - Patch up __diagused for when only one of INVARIANTS or WITNESS is defined 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: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: mjg X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: b40c0db6f6d61ed594118d81dc691b9263a7e4d7 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1651066217; 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=lC3R/ti11lM/e7UXZgFW8VcYb0RDg3szZ/020L/sxqk=; b=Aeft/kDp1rgY8yrVCXd8UyD5SIa+26XKSfhun/hG5KDIdFOhI7y8/KNDZt5XhOMeG0JYD3 3Pq5F9cmUqg/HsxHMohSCXJHIO44Cs1mQUGORL/lewDiHt84gkuK/6JBbTT4X8rf91GEuT 2/BT3DAEcKShEuxqUjIG/1VWIn/DZu0sB4docXEqxYxBLmGNyuRJpEscuYzvE73V9lbY9j LZfocsxLZRacN7haCrZJJsiVpGeQ5q0z+dPdBidWo+xBOZ3+CKrjWkmLN4O2XVoHD9jF32 7Oa8psJxBWyc0jo70+SE+RC0cKKqFYfDYAna7uuUJ2b+WOzMxoJdBGBra+EmSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1651066217; a=rsa-sha256; cv=none; b=fVpeE7v96l5VEbT/NQkFWxfskF5grhrOAXZQJKx4wx2k3/kfo6oK1pYPeL02UsZfTaNhap NTeDzLIB2QejvDKZJlmPDov5yNUfeNBWzrsqEZGMy4SeHKeptiv8Z7JOUuAy4GuZ4ynbfz wWo2rSzgsm/MDTRXHDntrfU67fJSYvgvrGemraGC2nxbZ33otpdJHGO6shXJjiORZANT6+ 0ErISKRD+vPnz+KWr3y19csvEnXpXLWB3fU6qAzheCKxytXLdkEKb12G40WuzZj85JhDjr w2YLCefDFXLy0DLI9/oruNkNxNP/2Z2DXufIgz9uK+ZYU3aFJx825xhzAsaRcQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=b40c0db6f6d61ed594118d81dc691b9263a7e4d7 commit b40c0db6f6d61ed594118d81dc691b9263a7e4d7 Author: Mateusz Guzik AuthorDate: 2022-04-27 13:29:12 +0000 Commit: Mateusz Guzik CommitDate: 2022-04-27 13:29:12 +0000 Patch up __diagused for when only one of INVARIANTS or WITNESS is defined Reported by: John F Carr --- sys/sys/systm.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/sys/systm.h b/sys/sys/systm.h index f2ffa7e6b815..6ca9ee886562 100644 --- a/sys/sys/systm.h +++ b/sys/sys/systm.h @@ -554,10 +554,13 @@ void _gone_in_dev(device_t dev, int major, const char *msg); #define gone_in(major, msg) __gone_ok(major, msg) _gone_in(major, msg) #define gone_in_dev(dev, major, msg) __gone_ok(major, msg) _gone_in_dev(dev, major, msg) -#if defined(INVARIANTS) || defined(WITNESS) -#define __diagused -#else +#if !defined(INVARIANTS) && !defined(WITNESS) +#define __diagused __unused +#elif ((defined(INVARIANTS) && !defined(WITNESS)) || \ + (!defined(INVARIANTS) && defined(WITNESS))) #define __diagused __unused +#else +#define __diagused #endif #endif /* _KERNEL */