From nobody Fri Jan 06 18:05:32 2023 X-Original-To: bugs@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 4NpWTm4nKfz2p5ql for ; Fri, 6 Jan 2023 18:05:32 +0000 (UTC) (envelope-from bugzilla-noreply@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 4NpWTm358Bz3K7N for ; Fri, 6 Jan 2023 18:05:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1673028332; 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=Wlhuld0+c5j7flu5lytYAOSM9IdrzPT+01mbVrUJ6fU=; b=Hm7sS35jyBy18Mi1zJBGPbshQvnpy0IIhWDs00oGyn9y8OMVTNNT5yVgFDBp5hjRU6c0S8 i3WVzimzQdyBgZBqmwqgl23sX0Rx1z403Mpq37w7jMEVmW4kYWAiS71OT0aPzewIlsWFiZ wK/qJTd8UruGI9ZsC3bv2ztwFchLIRD/fYfnaAzGt4RB/ceJW7kQbRHqEImp9SEor8OdfI fPDGAKe55pw3Jn1O27w0FmI4pJVZbXfDOo/77CTME8DSMCjWR3q9hmlLjR+nEsrERA2U88 z2cilIS9GSYUhMD6ADQGsP+3vnVWzAa0hIhOs7wzKxDdoUgWiIQFPnwDU7sa7g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1673028332; a=rsa-sha256; cv=none; b=k+hn45gs0rLzbytgaqtp1BC93pka8XWQCSRrhtP8asJJm+QUZIhLIg/M8kMQEQgOwSESMr LzC1HUSODrDPKHK+tvbPMBwqtWWT95kRnGZh4yy2jFTrQwp42AB178v/NSh8LxQ4WI3iIs RD5xIyg7kgfAzRK6WonmJnNIwOtuaxwrvecuEbkNkLJvKNLaAQNkj4oD6q3+eDQxbnzmdG /reg2mL0H6LS6TP93dhBCuuLLmOxhAn9HVD1d5AI2lCJE7hVxA1eeaAKfw06udA8P7322s ntRn5VXg9p+0czYCVe0+vko2IQZNzGudCSLrDXWDsSNURD86FLODr8SalE11Jg== Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (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 4NpWTm29M5zfj4 for ; Fri, 6 Jan 2023 18:05:32 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 306I5WF1075358 for ; Fri, 6 Jan 2023 18:05:32 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 306I5Wnn075357 for bugs@FreeBSD.org; Fri, 6 Jan 2023 18:05:32 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 268788] When kernel is being built without assertions there are a tons of warnings about unused variable Date: Fri, 06 Jan 2023 18:05:32 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 12.4-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: lev@FreeBSD.org X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@freebsd.org MIME-Version: 1.0 X-ThisMailContainsUnwantedMimeParts: N https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D268788 Bug ID: 268788 Summary: When kernel is being built without assertions there are a tons of warnings about unused variable Product: Base System Version: 12.4-RELEASE Hardware: Any OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: lev@FreeBSD.org sys/sys/bus.h defines __BUS_ACCESSOR macro which create "int e" variable. T= his variable is assigned always bu later used only in KASSERT() "call". If kern= el is being built without assertions, this "e" variable becomes set-but-unused= and generates a tons of warnings with clang included into 12-STABLE and later. Looks like this variable should be #ifdef'ed. Warnings looks like this: =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D In file included from /usr/src/sys/dev/mlx5/mlx5_core/mlx5_port.c:29: In file included from /usr/src/sys/dev/mlx5/port.h:31: In file included from /usr/src/sys/dev/mlx5/driver.h:35: In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/pci.h:44: /usr/src/sys/dev/pci/pcivar.h:420:1: warning: variable 'e' set but not used [-Wunused-but-set-variable] PCIB_ACCESSOR(bus, BUS, uint32_t) ^ /usr/src/sys/dev/pci/pcivar.h:417:5: note: expanded from macro 'PCIB_ACCESS= OR' __BUS_ACCESSOR(pcib, var, PCIB, ivar, type) ^ /usr/src/sys/sys/bus.h:814:6: note: expanded from macro '__BUS_ACCESSOR' int e; \ ^ In file included from /usr/src/sys/dev/mlx5/mlx5_core/mlx5_port.c:29: In file included from /usr/src/sys/dev/mlx5/port.h:31: In file included from /usr/src/sys/dev/mlx5/driver.h:35: In file included from /usr/src/sys/compat/linuxkpi/common/include/linux/pci.h:44: /usr/src/sys/dev/pci/pcivar.h:420:1: warning: variable 'e' set but not used [-Wunused-but-set-variable] /usr/src/sys/dev/pci/pcivar.h:417:5: note: expanded from macro 'PCIB_ACCESS= OR' __BUS_ACCESSOR(pcib, var, PCIB, ivar, type) ^ /usr/src/sys/sys/bus.h:826:6: note: expanded from macro '__BUS_ACCESSOR' int e; \ =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D --=20 You are receiving this mail because: You are the assignee for the bug.=