From nobody Wed Nov 04 19:29:44 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 4jKb9h1kLmz6yqyq for ; Wed, 04 Nov 2026 19:29:44 +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) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 4jKb9h13HYz3R1P for ; Wed, 04 Nov 2026 19:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793820584; 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=CdjqkRCshj7vtRbCAlBQ2FVdka3cqEc18PlEJMQhVzk=; b=oGYa4NotKSYHk0nFVqRssY15u99dyA0+H7wZ+0h6c3qQR8FMfv5e0qeVqlKCdR22mtv6vV HoQpoYtyf38pJo4in3W3feQc3MpYxoJ2PszSLGjcbNPFihVjBNyFAw6cCBvNWbk9PA9xsx ZDQv2tWN2AhXSPhaYHF/2SwaZZ4L+zpx1bHqcEDiDS7RIR7WrDLMOBuG674AaeotrEkyRt /D2/Bexj9ET46id7VnmWa2FhZJuufJW0A118Z4SReqxWnFoNgtavSY1MSwt5rgKYn6Kuet wvf1CuRJdizaCE3IE5Bqfxx/ZsWhzdL2BGw/RybdJljKOazeAu/tX0WcKW+ZIA== ARC-Seal: i=1; a=rsa-sha256; d=freebsd.org; s=dkim; cv=none; t=1793820584; b=LopUfLJHT0yalkbQ349TNxmX3Jz9zd+vVllSlztIRP+5tZ8H0jE19ZQ8ArCQTJSEpj0c5S lWgP1wYORwIvPrwd8m6Kw7b+kRWfDHtnnm1jN3CYknc0s6v9Ms/RdDQrgWgK19IrCGMCEc E17WAEe9CWZ1XS1IyZTs0r+bXCExCMDSoaksZU0hv8j8En3pInerGHR1qmci3Sj9+aYgj1 Czgx6HD0RCIW2B4C8lnjI3cQMyyy5yPQS1a07HkLhbgHfdynbDDO0tixcSxYBQM33vnzDV RneoLnF1UtwL7bjpeQhnUkCOwUMjRBUF9q/slSCTPlAK2MQek8VTt5NyXipYZg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1793820584; 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=CdjqkRCshj7vtRbCAlBQ2FVdka3cqEc18PlEJMQhVzk=; b=WnuNq45PMDdXRHfrzsiPiF/UhpxnBkUdaQREFAve4z8qFndCCsfcrDLOAeGLgaD6uey9gq rzOL38WX8niADYmVoHtTfz5LCu3yJ7km40GPomC04wKToYxDJJhfHMyDO3G0PUpWcbEFjv 4Vt2leqnu4daC5KbqbwYem/tDnECUL8YndVhUwzHS4TejZzV4gI4V5oXefWTiCDFRYvZw8 TwJtLAAtzc8x706D+B1sKEtk4TmPz0E5UVCA/SRNL3M/fjk/BQBiV5HZF38Ldr3l9/Xjse 76nN835TrBMJe1XTm/PAdLG050Knb+Th+IqOZYNOHBuKXXt1xSGME5+eLFMpdQ== 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 4jKb9h0kBVzGhs for ; Wed, 04 Nov 2026 19:29:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from git (uid 1279) (envelope-from git@FreeBSD.org) id 3b986 by gitrepo.freebsd.org (DragonFly Mail Agent v0.13+ on gitrepo.freebsd.org); Wed, 04 Nov 2026 19:29:44 +0000 To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Zhenlei Huang Subject: git: 8e429142feaa - main - kobj: Avoid initializing pointer from boolean value List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org List-Id: Commit messages for all branches of the src repository List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: zlei X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 8e429142feaaf96456566d3111fa893e29e8fd53 Auto-Submitted: auto-generated Date: Wed, 04 Nov 2026 19:29:44 +0000 Message-Id: <6aeb87a8.3b986.3a707d7d@gitrepo.freebsd.org> The branch main has been updated by zlei: URL: https://cgit.FreeBSD.org/src/commit/?id=8e429142feaaf96456566d3111fa893e29e8fd53 commit 8e429142feaaf96456566d3111fa893e29e8fd53 Author: Zhenlei Huang AuthorDate: 2026-11-04 19:28:30 +0000 Commit: Zhenlei Huang CommitDate: 2026-11-04 19:28:30 +0000 kobj: Avoid initializing pointer from boolean value Prior to change 477c594d9063, the struct kobj_class has six members but the DEFINE_CLASS_[0..3] only initialize the first four of them. The change 477c594d9063 intends to initialize the two new members but actually acts on the wrong ones. ``` error: initialization of pointer of type 'kobj_ops_t' (aka 'struct kobj_ops *') to null from a constant boolean expression [-Werror,-Wbool-conversion] ``` Fix by initializing the two new members implicitly. Reported by: clang (-std=gnu23 -Wbool-conversion) Reviewed by: mmel, kib Fixes: 477c594d9063 kobj: allow multiple inheritance with per-class softc MFC with: 477c594d9063 Differential Revision: https://reviews.freebsd.org/D61173 --- sys/sys/kobj.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h index e248f9eafaf8..bcf3315d8fe0 100644 --- a/sys/sys/kobj.h +++ b/sys/sys/kobj.h @@ -33,7 +33,7 @@ /* XXX workaround for bool type for tools/build/test-includes */ #if !defined(_KERNEL) && !defined(_STANDALONE) -#include +#include #endif /* @@ -131,7 +131,7 @@ DEFINE_CLASS_0(name, name ## _class, methods, size) #define DEFINE_CLASS_0(name, classvar, methods, size) \ \ struct kobj_class classvar = { \ - #name, methods, size, NULL, 0, false \ + #name, methods, size, NULL \ } /* @@ -146,8 +146,7 @@ struct kobj_class classvar = { \ static kobj_class_t name ## _baseclasses[] = \ { &base1, NULL }; \ struct kobj_class classvar = { \ - #name, methods, size, name ## _baseclasses, 0, \ - false \ + #name, methods, size, name ## _baseclasses \ } /* @@ -163,8 +162,7 @@ static kobj_class_t name ## _baseclasses[] = \ { &base1, \ &base2, NULL }; \ struct kobj_class classvar = { \ - #name, methods, size, name ## _baseclasses, 0, \ - false \ + #name, methods, size, name ## _baseclasses \ } /* @@ -181,8 +179,7 @@ static kobj_class_t name ## _baseclasses[] = \ &base2, \ &base3, NULL }; \ struct kobj_class classvar = { \ - #name, methods, size, name ## _baseclasses, 0, \ - false \ + #name, methods, size, name ## _baseclasses \ } /*