lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [thread-next>] [day] [month] [year] [list]
Message-ID: <2621923.3aVJ40SYcy@voltaire>
Date:	Thu, 19 Feb 2015 13:35:23 +0800
From:	Marek Lindner <mareklindner@...mailbox.ch>
To:	Joe Perches <joe@...ches.com>,
	"b.a.t.m.a.n" <b.a.t.m.a.n@...ts.open-mesh.org>,
	linux-kernel@...r.kernel.org
Subject: checkpatch: CHECK: No space is necessary after a cast


Hi Joe,

we have come across a checkpatch false-positive:

>>>>
static void batadv_recv_handler_init(void)
{
	int i;

	for (i = 0; i < ARRAY_SIZE(batadv_rx_handler); i++)
		batadv_rx_handler[i] = batadv_recv_unhandled_packet;

	for (i = BATADV_UNICAST_MIN; i <= BATADV_UNICAST_MAX; i++)
		batadv_rx_handler[i] = batadv_recv_unhandled_unicast_packet;

	/* compile time checks for sizes */
	BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);
	BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);
	BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);
        ..
}
<<<<<

The following warnings are triggered:

CHECK: No space is necessary after a cast
#440: FILE: main.c:440:
+       BUILD_BUG_ON(sizeof(struct batadv_bla_claim_dst) != 6);

CHECK: No space is necessary after a cast
#441: FILE: main.c:441:
+       BUILD_BUG_ON(sizeof(struct batadv_ogm_packet) != 24);

CHECK: No space is necessary after a cast
#442: FILE: main.c:442:
+       BUILD_BUG_ON(sizeof(struct batadv_icmp_header) != 20);

Can you make a suggestion / patch for checkpatch to better handle this case ?

Thanks,
Marek

Download attachment "signature.asc" of type "application/pgp-signature" (474 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ