[SLOF] [PATCH v4 02/23] virtio-net: fix gcc warnings (-Wextra)
Thomas Huth
thuth at redhat.com
Fri Jan 29 03:49:42 AEDT 2016
On 28.01.2016 11:24, Nikunj A Dadhania wrote:
> Change rx_size type which originally should have been uint32_t. This
> also requires a change in the function prototype.
Maybe add: "Also change the return type of virtio_9p_load() to silence
another gcc warning" ?
> Signed-off-by: Nikunj A Dadhania <nikunj at linux.vnet.ibm.com>
> ---
> lib/libvirtio/p9.c | 2 +-
> lib/libvirtio/p9.h | 2 +-
> lib/libvirtio/virtio-9p.c | 6 +++---
> lib/libvirtio/virtio-9p.h | 2 +-
> 4 files changed, 6 insertions(+), 6 deletions(-)
...
> -int virtio_9p_load(struct virtio_device *dev, const char *file_name, uint8_t *buffer)
> +long virtio_9p_load(struct virtio_device *dev, const char *file_name, uint8_t *buffer)
> {
> int rc;
> uint16_t tag_len;
> @@ -332,5 +332,5 @@ cleanup_connection:
>
>
> dprintf("%s : complete, read %llu bytes\n", __func__, offset);
> - return rc == 0 ? offset : rc;
> + return rc == 0 ? (long)offset : rc;
> }
> diff --git a/lib/libvirtio/virtio-9p.h b/lib/libvirtio/virtio-9p.h
> index 4bf47d0..db2cf6f 100644
> --- a/lib/libvirtio/virtio-9p.h
> +++ b/lib/libvirtio/virtio-9p.h
> @@ -26,7 +26,7 @@ typedef struct {
> int virtio_9p_init(struct virtio_device *dev, void *tx_buf, void *rx_buf,
> int buf_size);
> void virtio_9p_shutdown(struct virtio_device *dev);
> -int virtio_9p_load(struct virtio_device *dev, const char *file_name, uint8_t *buffer);
> +long virtio_9p_load(struct virtio_device *dev, const char *file_name, uint8_t *buffer);
>
>
> #endif /* VIRTIO_9P_H_ */
Reviewed-by: Thomas Huth <thuth at redhat.com>
More information about the SLOF
mailing list