[Pkg-libvirt-commits] [libguestfs] 338/384: builder: Fix comparison between signed/unsigned in parallel xzcat.
Hilko Bengen
bengen at moszumanska.debian.org
Sun Mar 29 16:59:08 UTC 2015
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to branch experimental
in repository libguestfs.
commit 3053785db82c3aaf935c582146fd863d3618910f
Author: Richard W.M. Jones <rjones at redhat.com>
Date: Mon Mar 9 13:13:16 2015 +0000
builder: Fix comparison between signed/unsigned in parallel xzcat.
block.header_size is uint32_t so cannot be compared directly with n (ssize_t).
pxzcat-c.c: In function 'worker_thread':
pxzcat-c.c:602:21: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
if (n >= 0 && n != block.header_size-1) {
^
---
builder/pxzcat-c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/builder/pxzcat-c.c b/builder/pxzcat-c.c
index dec9cc2..fb1a865 100644
--- a/builder/pxzcat-c.c
+++ b/builder/pxzcat-c.c
@@ -599,7 +599,7 @@ worker_thread (void *vp)
/* Now read and decode the block header. */
n = pread (global->fd, &header[1], block.header_size-1, position);
- if (n >= 0 && n != block.header_size-1) {
+ if (n >= 0 && n != (ssize_t) block.header_size-1) {
fprintf (stderr,
"%s: read: unexpected end of file reading block header\n",
global->filename);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-libvirt/libguestfs.git
More information about the Pkg-libvirt-commits
mailing list