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]
Date:	Wed, 20 Feb 2013 11:52:10 -0300
From:	Fabio Estevam <festevam@...il.com>
To:	akpm@...ux-foundation.org
Cc:	sfr@...b.auug.org.au, linux-kernel@...r.kernel.org,
	Fabio Estevam <fabio.estevam@...escale.com>,
	Peter Jones <pjones@...hat.com>,
	Matt Fleming <matt.fleming@...el.com>,
	Jens Axboe <axboe@...nel.dk>
Subject: [PATCH] block: partitions: efi: Typecast sizeof(gpt_header)

From: Fabio Estevam <fabio.estevam@...escale.com>

Since commit ef25bb0fa6e2 (block/partitions/efi.c: ensure that the GPT header is
at least the size of the structure.) , when building for a 32-bit architecture, 
such as ARM, the following build warning is seen:

block/partitions/efi.c:324:3: warning: format '%lu' expects argument of type 'long unsigned int', but argument 3 has type 'unsigned int' [-Wformat]

Typecast sizeof(gpt_header) to (unsigned long) to avoid such warning on 32-bit 
systems.

Reported-by: Stephen Rothwell <sfr@...b.auug.org.au>
Cc: Peter Jones <pjones@...hat.com>
Cc: Matt Fleming <matt.fleming@...el.com>
Cc: Jens Axboe <axboe@...nel.dk>
Cc: Andrew Morton <akpm@...ux-foundation.org>
Signed-off-by: Fabio Estevam <fabio.estevam@...escale.com>
---
 block/partitions/efi.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/block/partitions/efi.c b/block/partitions/efi.c
index a7475e7..62e05cf 100644
--- a/block/partitions/efi.c
+++ b/block/partitions/efi.c
@@ -323,7 +323,7 @@ static int is_gpt_valid(struct parsed_partitions *state, u64 lba,
 	if (le32_to_cpu((*gpt)->header_size) < sizeof(gpt_header)) {
 		pr_debug("GUID Partition Table Header size is too small: %u < %lu\n",
 			le32_to_cpu((*gpt)->header_size),
-			sizeof(gpt_header));
+			(unsigned long)sizeof(gpt_header));
 		goto fail;
 	}
 
-- 
1.7.9.5

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ