* [Qemu-devel] [PATCH 1/6] Remove unused argument for nbd_client()
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 2/6] Respect return value from nbd_client() Jes.Sorensen
` (5 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
nbd.c | 4 ++--
nbd.h | 2 +-
qemu-nbd.c | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/nbd.c b/nbd.c
index a9f295f..7049998 100644
--- a/nbd.c
+++ b/nbd.c
@@ -393,7 +393,7 @@ int nbd_disconnect(int fd)
return 0;
}
-int nbd_client(int fd, int csock)
+int nbd_client(int fd)
{
int ret;
int serrno;
@@ -427,7 +427,7 @@ int nbd_disconnect(int fd)
return -1;
}
-int nbd_client(int fd, int csock)
+int nbd_client(int fd)
{
errno = ENOTSUP;
return -1;
diff --git a/nbd.h b/nbd.h
index 5a1fbdf..f103c3c 100644
--- a/nbd.h
+++ b/nbd.h
@@ -55,7 +55,7 @@ int nbd_send_request(int csock, struct nbd_request *request);
int nbd_receive_reply(int csock, struct nbd_reply *reply);
int nbd_trip(BlockDriverState *bs, int csock, off_t size, uint64_t dev_offset,
off_t *offset, bool readonly, uint8_t *data, int data_size);
-int nbd_client(int fd, int csock);
+int nbd_client(int fd);
int nbd_disconnect(int fd);
#endif
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 4e607cf..9cc8f47 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -417,7 +417,7 @@ int main(int argc, char **argv)
show_parts(device);
- nbd_client(fd, sock);
+ nbd_client(fd);
close(fd);
out:
kill(pid, SIGTERM);
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 2/6] Respect return value from nbd_client()
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 1/6] Remove unused argument for nbd_client() Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 3/6] Fix repeated typo: was "end if list" instead of "end of list" Jes.Sorensen
` (4 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
qemu-nbd.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diff --git a/qemu-nbd.c b/qemu-nbd.c
index 9cc8f47..67ce50b 100644
--- a/qemu-nbd.c
+++ b/qemu-nbd.c
@@ -417,7 +417,10 @@ int main(int argc, char **argv)
show_parts(device);
- nbd_client(fd);
+ ret = nbd_client(fd);
+ if (ret) {
+ ret = 1;
+ }
close(fd);
out:
kill(pid, SIGTERM);
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 3/6] Fix repeated typo: was "end if list" instead of "end of list"
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 1/6] Remove unused argument for nbd_client() Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 2/6] Respect return value from nbd_client() Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 4/6] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data() Jes.Sorensen
` (3 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
qemu-config.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/qemu-config.c b/qemu-config.c
index 3abe655..1efdbec 100644
--- a/qemu-config.c
+++ b/qemu-config.c
@@ -80,7 +80,7 @@ static QemuOptsList qemu_drive_opts = {
.name = "readonly",
.type = QEMU_OPT_BOOL,
},
- { /* end if list */ }
+ { /* end of list */ }
},
};
@@ -147,7 +147,7 @@ static QemuOptsList qemu_chardev_opts = {
.name = "signal",
.type = QEMU_OPT_BOOL,
},
- { /* end if list */ }
+ { /* end of list */ }
},
};
@@ -203,7 +203,7 @@ static QemuOptsList qemu_device_opts = {
* sanity checking will happen later
* when setting device properties
*/
- { /* end if list */ }
+ { /* end of list */ }
},
};
@@ -247,7 +247,7 @@ static QemuOptsList qemu_rtc_opts = {
.name = "driftfix",
.type = QEMU_OPT_STRING,
},
- { /* end if list */ }
+ { /* end of list */ }
},
};
@@ -265,7 +265,7 @@ static QemuOptsList qemu_global_opts = {
.name = "value",
.type = QEMU_OPT_STRING,
},
- { /* end if list */ }
+ { /* end of list */ }
},
};
@@ -284,7 +284,7 @@ static QemuOptsList qemu_mon_opts = {
.name = "default",
.type = QEMU_OPT_BOOL,
},
- { /* end if list */ }
+ { /* end of list */ }
},
};
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 4/6] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data()
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
` (2 preceding siblings ...)
2010-08-31 7:30 ` [Qemu-devel] [PATCH 3/6] Fix repeated typo: was "end if list" instead of "end of list" Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 5/6] Change DPRINTF() to do{}while(0) to avoid compiler warning Jes.Sorensen
` (2 subsequent siblings)
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
ui/vnc-enc-tight.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/ui/vnc-enc-tight.c b/ui/vnc-enc-tight.c
index c4c9c3b..c942bb7 100644
--- a/ui/vnc-enc-tight.c
+++ b/ui/vnc-enc-tight.c
@@ -905,7 +905,7 @@ static void tight_pack24(VncState *vs, uint8_t *buf, size_t count, size_t *ret)
static int send_full_color_rect(VncState *vs, int x, int y, int w, int h)
{
int stream = 0;
- size_t bytes;
+ ssize_t bytes;
#ifdef CONFIG_VNC_PNG
if (tight_can_send_png_rect(vs, w, h)) {
@@ -949,7 +949,7 @@ static int send_solid_rect(VncState *vs)
static int send_mono_rect(VncState *vs, int x, int y,
int w, int h, uint32_t bg, uint32_t fg)
{
- size_t bytes;
+ ssize_t bytes;
int stream = 1;
int level = tight_conf[vs->tight.compression].mono_zlib_level;
@@ -1029,7 +1029,7 @@ static bool send_gradient_rect(VncState *vs, int x, int y, int w, int h)
{
int stream = 3;
int level = tight_conf[vs->tight.compression].gradient_zlib_level;
- size_t bytes;
+ ssize_t bytes;
if (vs->clientds.pf.bytes_per_pixel == 1)
return send_full_color_rect(vs, x, y, w, h);
@@ -1066,7 +1066,7 @@ static int send_palette_rect(VncState *vs, int x, int y,
int stream = 2;
int level = tight_conf[vs->tight.compression].idx_zlib_level;
int colors;
- size_t bytes;
+ ssize_t bytes;
#ifdef CONFIG_VNC_PNG
if (tight_can_send_png_rect(vs, w, h)) {
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 5/6] Change DPRINTF() to do{}while(0) to avoid compiler warning
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
` (3 preceding siblings ...)
2010-08-31 7:30 ` [Qemu-devel] [PATCH 4/6] size_t is unsigned, change to ssize_t to handle errors from tight_compress_data() Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-08-31 7:30 ` [Qemu-devel] [PATCH 6/6] load_multiboot(): get_image_size() returns int Jes.Sorensen
2010-09-04 10:05 ` [Qemu-devel] Re: [PATCH 0/6] bugs from gcc warning fixes v3 Blue Swirl
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
slirp/bootp.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/slirp/bootp.c b/slirp/bootp.c
index 3e4e881..41460ff 100644
--- a/slirp/bootp.c
+++ b/slirp/bootp.c
@@ -33,7 +33,7 @@ static const uint8_t rfc1533_cookie[] = { RFC1533_COOKIE };
#define DPRINTF(fmt, ...) \
do if (slirp_debug & DBG_CALL) { fprintf(dfd, fmt, ## __VA_ARGS__); fflush(dfd); } while (0)
#else
-#define DPRINTF(fmt, ...)
+#define DPRINTF(fmt, ...) do{}while(0)
#endif
static BOOTPClient *get_new_addr(Slirp *slirp, struct in_addr *paddr,
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] [PATCH 6/6] load_multiboot(): get_image_size() returns int
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
` (4 preceding siblings ...)
2010-08-31 7:30 ` [Qemu-devel] [PATCH 5/6] Change DPRINTF() to do{}while(0) to avoid compiler warning Jes.Sorensen
@ 2010-08-31 7:30 ` Jes.Sorensen
2010-09-04 10:05 ` [Qemu-devel] Re: [PATCH 0/6] bugs from gcc warning fixes v3 Blue Swirl
6 siblings, 0 replies; 8+ messages in thread
From: Jes.Sorensen @ 2010-08-31 7:30 UTC (permalink / raw)
To: qemu-devel; +Cc: blauwirbel, Jes.Sorensen
From: Jes Sorensen <Jes.Sorensen@redhat.com>
Do not store return of get_image_size() in a uint32_t as it makes it
impossible to detect error returns from get_image_size.
Signed-off-by: Jes Sorensen <Jes.Sorensen@redhat.com>
---
hw/multiboot.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/hw/multiboot.c b/hw/multiboot.c
index dc980e6..f9097a2 100644
--- a/hw/multiboot.c
+++ b/hw/multiboot.c
@@ -252,7 +252,7 @@ int load_multiboot(void *fw_cfg,
do {
char *next_space;
- uint32_t mb_mod_length;
+ int mb_mod_length;
uint32_t offs = mbs.mb_buf_size;
next_initrd = strchr(initrd_filename, ',');
--
1.7.2.2
^ permalink raw reply related [flat|nested] 8+ messages in thread
* [Qemu-devel] Re: [PATCH 0/6] bugs from gcc warning fixes v3
2010-08-31 7:30 [Qemu-devel] [PATCH 0/6] bugs from gcc warning fixes v3 Jes.Sorensen
` (5 preceding siblings ...)
2010-08-31 7:30 ` [Qemu-devel] [PATCH 6/6] load_multiboot(): get_image_size() returns int Jes.Sorensen
@ 2010-09-04 10:05 ` Blue Swirl
6 siblings, 0 replies; 8+ messages in thread
From: Blue Swirl @ 2010-09-04 10:05 UTC (permalink / raw)
To: Jes.Sorensen; +Cc: qemu-devel
Thanks, applied all.
On Tue, Aug 31, 2010 at 7:30 AM, <Jes.Sorensen@redhat.com> wrote:
> From: Jes Sorensen <Jes.Sorensen@redhat.com>
>
> Hi,
>
> Given the contention of the previous patch set, this is a stripped
> down version that doesn't have any of the parts included that got
> people up in arms. Lets at least start out getting the real bugs fixed
> and we can look at the other issues in parallel.
>
> Cheers,
> Jes
>
>
> Jes Sorensen (6):
> Remove unused argument for nbd_client()
> Respect return value from nbd_client()
> Fix repeated typo: was "end if list" instead of "end of list"
> size_t is unsigned, change to ssize_t to handle errors from
> tight_compress_data()
> Change DPRINTF() to do{}while(0) to avoid compiler warning
> load_multiboot(): get_image_size() returns int
>
> hw/multiboot.c | 2 +-
> nbd.c | 4 ++--
> nbd.h | 2 +-
> qemu-config.c | 12 ++++++------
> qemu-nbd.c | 5 ++++-
> slirp/bootp.c | 2 +-
> ui/vnc-enc-tight.c | 8 ++++----
> 7 files changed, 19 insertions(+), 16 deletions(-)
>
> --
> 1.7.2.2
>
>
^ permalink raw reply [flat|nested] 8+ messages in thread