From owner-freebsd-amd64@freebsd.org Mon Jan 30 00:33:31 2017 Return-Path: Delivered-To: freebsd-amd64@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D7B24CC606F for ; Mon, 30 Jan 2017 00:33:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BCA491A95 for ; Mon, 30 Jan 2017 00:33:31 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id v0U0XVUK034960 for ; Mon, 30 Jan 2017 00:33:31 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-amd64@FreeBSD.org Subject: [Bug 216588] head -312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry' Date: Mon, 30 Jan 2017 00:33:31 +0000 X-Bugzilla-Reason: CC X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: CURRENT X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-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 cc 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 MIME-Version: 1.0 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Jan 2017 00:33:31 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D216588 Bug ID: 216588 Summary: head -312942 via amd64-xtoolchain-gcc: dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry' Product: Base System Version: CURRENT Hardware: amd64 OS: Any Status: New Severity: Affects Only Me Priority: --- Component: kern Assignee: freebsd-bugs@FreeBSD.org Reporter: markmi@dsl-only.net CC: freebsd-amd64@FreeBSD.org CC: freebsd-amd64@FreeBSD.org When I attempted to buildworld buildkernel for -r312942 via use of amd64-xtoolchain-gcc it stopped with: --- all_subdir_mlx5en --- /usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c: In function 'mlx5e_create_diagnostics': /usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c:665:9: error: assignment of read-only variable 'entry' entry =3D mlx5_core_pci_diagnostics_table[x]; ^ /usr/src/sys/modules/mlx5en/../../dev/mlx5/mlx5_en/mlx5_en_ethtool.c:675:9: error: assignment of read-only variable 'entry' entry =3D mlx5_core_general_diagnostics_table[x]; ^ *** [mlx5_en_ethtool.o] Error code 1 make[4]: stopped in /usr/src/sys/modules/mlx5en .ERROR_TARGET=3D'mlx5_en_ethtool.o' .ERROR_META_FILE=3D'/usr/obj/amd64_xtoolchain/amd64.amd64/usr/src/sys/GENER= IC-NODBG/modules/usr/src/sys/modules/mlx5en/mlx5_en_ethtool.o.meta' /usr/src/sys/dev/mlx5/diagnostics.h shows: struct mlx5_core_diagnostics_entry { const char *const desc; u16 counter_id; }; Note the const between * and desc: the pointer is declared to be constant. /usr/src/sys/dev/mlx5/mlx5_en/mlx5_en_ethtool.c shows: static void mlx5e_create_diagnostics(struct mlx5e_priv *priv) { struct mlx5_core_diagnostics_entry entry; . . . for (x =3D 0; x !=3D MLX5_CORE_PCI_DIAGNOSTICS_NUM; x++) { entry =3D mlx5_core_pci_diagnostics_table[x]; . . . } /* create general diagnostics */ for (x =3D 0; x !=3D MLX5_CORE_GENERAL_DIAGNOSTICS_NUM; x++) { entry =3D mlx5_core_general_diagnostics_table[x]; . . } } which involves assignments to constant pointers: the desc value is supposed to be constant. --=20 You are receiving this mail because: You are on the CC list for the bug.=