[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: [Xen-devel] [PATCH] tools/libxc: Annotate xc_report_error with __attribute__((format))
On Tue, 2014-06-03 at 18:45 +0100, Andrew Cooper wrote: > diff --git a/tools/libxc/xc_domain_restore.c b/tools/libxc/xc_domain_restore.c > index 89af1ad..d950639 100644 > --- a/tools/libxc/xc_domain_restore.c > +++ b/tools/libxc/xc_domain_restore.c > @@ -102,7 +102,7 @@ static ssize_t rdexact(xc_interface *xch, struct > restore_ctx *ctx, > errno = 0; > } > if ( len <= 0 ) { > - ERROR("%s failed (read rc: %d, errno: %d)", __func__, len, > errno); > + ERROR("%s failed (read rc: %ld, errno: %d)", __func__, > (long)len, errno); The correct way to print an ssize_t is %zd. > return -1; > } > offset += len; > @@ -443,7 +443,7 @@ static int compat_buffer_qemu(xc_interface *xch, struct > restore_ctx *ctx, > } > > if ( memcmp(qbuf, "QEVM", 4) ) { > - ERROR("Invalid QEMU magic: 0x%08x", *(unsigned long*)qbuf); > + ERROR("Invalid QEMU magic: 0x%08x", *(uint32_t*)qbuf); 0x%08lx with unsigned long or 0x%PRIx32 with uint32_t, not some hybrid, please. (I thin %..lx is the right answer here) > free(qbuf); > return -1; > } Ian. _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxx http://lists.xen.org/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |