qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long'


From: Richard W.M. Jones
Subject: Re: [Qemu-devel] [PATCH] block: Explicitly specify 'unsigned long long' for VHDX 64-bit constants
Date: Fri, 14 Mar 2014 15:36:39 +0000
User-agent: Mutt/1.5.20 (2009-12-10)

On Fri, Mar 14, 2014 at 06:50:37AM -0400, Jeff Cody wrote:
> 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.
> -#define VHDX_FILE_SIGNATURE 0x656C696678646876  /* "vhdxfile" in ASCII */
> +#define VHDX_FILE_SIGNATURE 0x656C696678646876ULL  /* "vhdxfile" in ASCII */

I think it's better to use this C99-defined feature (from <stdint.h>):

#define VHDX_FILE_SIGNATURE UINT64_C(0x656C696678646876)

Rich.

-- 
Richard Jones, Virtualization Group, Red Hat http://people.redhat.com/~rjones
libguestfs lets you edit virtual machines.  Supports shell scripting,
bindings from many languages.  http://libguestfs.org



reply via email to

[Prev in Thread] Current Thread [Next in Thread]