qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants
@ 2014-03-14 10:50 Jeff Cody
  2014-03-14 15:25 ` Stefan Hajnoczi
  2014-03-14 15:36 ` Richard W.M. Jones
  0 siblings, 2 replies; 19+ messages in thread
From: Jeff Cody @ 2014-03-14 10:50 UTC (permalink / raw)
  To: qemu-devel; +Cc: kwolf, agraf, stefanha

On 32-bit hosts, some compilers will warn on too large integer constants
for constants that are 64-bit in length.  Explicitly put a 'ULL' suffix
on those defines.

Reported-by: Alexander Graf <agraf@suse.de>
Signed-off-by: Jeff Cody <jcody@redhat.com>
---
 block/vhdx.h | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/block/vhdx.h b/block/vhdx.h
index 2acd7c2..8103d4c 100644
--- a/block/vhdx.h
+++ b/block/vhdx.h
@@ -61,7 +61,7 @@
 /* These structures are ones that are defined in the VHDX specification
  * document */
 
-#define VHDX_FILE_SIGNATURE 0x656C696678646876  /* "vhdxfile" in ASCII */
+#define VHDX_FILE_SIGNATURE 0x656C696678646876ULL  /* "vhdxfile" in ASCII */
 typedef struct VHDXFileIdentifier {
     uint64_t    signature;              /* "vhdxfile" in ASCII */
     uint16_t    creator[256];           /* optional; utf-16 string to identify
@@ -238,7 +238,7 @@ typedef struct QEMU_PACKED VHDXLogDataSector {
 /* upper 44 bits are the file offset in 1MB units lower 3 bits are the state
    other bits are reserved */
 #define VHDX_BAT_STATE_BIT_MASK 0x07
-#define VHDX_BAT_FILE_OFF_MASK  0xFFFFFFFFFFF00000 /* upper 44 bits */
+#define VHDX_BAT_FILE_OFF_MASK  0xFFFFFFFFFFF00000ULL /* upper 44 bits */
 typedef uint64_t VHDXBatEntry;
 
 /* ---- METADATA REGION STRUCTURES ---- */
@@ -247,7 +247,7 @@ typedef uint64_t VHDXBatEntry;
 #define VHDX_METADATA_MAX_ENTRIES 2047  /* not including the header */
 #define VHDX_METADATA_TABLE_MAX_SIZE \
     (VHDX_METADATA_ENTRY_SIZE * (VHDX_METADATA_MAX_ENTRIES+1))
-#define VHDX_METADATA_SIGNATURE 0x617461646174656D  /* "metadata" in ASCII */
+#define VHDX_METADATA_SIGNATURE 0x617461646174656DULL  /* "metadata" in ASCII */
 typedef struct QEMU_PACKED VHDXMetadataTableHeader {
     uint64_t    signature;              /* "metadata" in ASCII */
     uint16_t    reserved;
-- 
1.8.3.1

^ permalink raw reply related	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2014-03-14 18:57 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-14 10:50 [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants Jeff Cody
2014-03-14 15:25 ` Stefan Hajnoczi
2014-03-14 15:36 ` Richard W.M. Jones
2014-03-14 15:38   ` Peter Maydell
2014-03-14 15:57     ` Richard W.M. Jones
2014-03-14 16:26       ` Laszlo Ersek
2014-03-14 16:51         ` Richard W.M. Jones
2014-03-14 17:27           ` Laszlo Ersek
2014-03-14 17:49             ` Richard W.M. Jones
2014-03-14 18:16               ` Laszlo Ersek
2014-03-14 16:17   ` Laszlo Ersek
2014-03-14 16:26     ` Peter Maydell
2014-03-14 16:35       ` Laszlo Ersek
2014-03-14 16:36         ` Laszlo Ersek
2014-03-14 17:08         ` Peter Maydell
2014-03-14 17:42           ` Laszlo Ersek
2014-03-14 18:22             ` Peter Maydell
2014-03-14 18:49               ` Laszlo Ersek
2014-03-14 18:57                 ` Laszlo Ersek

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).