diff options
author | Marcus Meissner <marcus@jet.franken.de> | 2014-04-11 20:15:34 +0000 |
---|---|---|
committer | Marcus Meissner <marcus@jet.franken.de> | 2014-04-11 20:15:34 +0000 |
commit | 7318557c352d818da699bc5328756c233c9c1060 (patch) | |
tree | cf2f2b41b0eceb2b1c56679c259871b976003ab5 /camlibs/stv0674 | |
parent | 73861f12036b5dfb912ca0214e6f574a0161c023 (diff) | |
download | libgphoto2-7318557c352d818da699bc5328756c233c9c1060.tar.gz |
iFrom: "Daniel P. Berrange" <dan@berrange.com>
Many calls of gp_port_* functions are passing a 'unsigned char *'
rather than the 'char *' they expect. Add explicit casts to
silence the compiler.
git-svn-id: https://svn.code.sf.net/p/gphoto/code/trunk/libgphoto2@14899 67ed7778-7388-44ab-90cf-0a291f65f57c
Diffstat (limited to 'camlibs/stv0674')
-rw-r--r-- | camlibs/stv0674/library.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/camlibs/stv0674/library.c b/camlibs/stv0674/library.c index 676f09df7..d61edd7ab 100644 --- a/camlibs/stv0674/library.c +++ b/camlibs/stv0674/library.c @@ -50,7 +50,7 @@ int stv0674_ping(GPPort *port) int ret; unsigned char reply[4]; - ret = gp_port_usb_msg_read (port, CMDID_PING, 0, 0, reply, 1); + ret = gp_port_usb_msg_read (port, CMDID_PING, 0, 0, (char *)reply, 1); if (ret < GP_OK) return ret; @@ -69,7 +69,7 @@ int stv0674_file_count(GPPort *port, int *count) int ret; unsigned char reply[4]; - ret = gp_port_usb_msg_read (port, CMDID_ENUMERATE_IMAGES, 0, 0, reply, 4); + ret = gp_port_usb_msg_read (port, CMDID_ENUMERATE_IMAGES, 0, 0, (char *)reply, 4); if (ret < GP_OK) return ret; @@ -118,11 +118,11 @@ int stv0674_get_image(GPPort *port, int image_no, CameraFile *file) setval(imagno,image_no); - ret = gp_port_usb_msg_write (port, CMDID_SET_IMAGE, 0, 0, imagno, 4); + ret = gp_port_usb_msg_write (port, CMDID_SET_IMAGE, 0, 0, (char *)imagno, 4); if (ret < GP_OK) return ret; - ret = gp_port_usb_msg_read (port, CMDID_IHAVENOIDEA, 0, 0, reply, 2); + ret = gp_port_usb_msg_read (port, CMDID_IHAVENOIDEA, 0, 0, (char *)reply, 2); if (ret < GP_OK) return ret; @@ -132,12 +132,12 @@ int stv0674_get_image(GPPort *port, int image_no, CameraFile *file) CMDID_READ_IMAGE, READ_IMAGE_VALUE_RESET, 0, - imagno, + (char *)imagno, 8); if (ret < GP_OK) return ret; - gp_port_read(port, header, 0x200); + gp_port_read(port, (char *)header, 0x200); size=(header[0x47]<<8) | header[0x48]; @@ -160,14 +160,14 @@ int stv0674_get_image(GPPort *port, int image_no, CameraFile *file) CMDID_READ_IMAGE, READ_IMAGE_VALUE_READ, 0, - imagno, + (char *)imagno, 8); if (ret < GP_OK) { free (data); return ret; } - gp_port_read(port, &data[current*0x1000], 0x1000); + gp_port_read(port, (char *)&data[current*0x1000], 0x1000); } if(remain) @@ -177,14 +177,14 @@ int stv0674_get_image(GPPort *port, int image_no, CameraFile *file) CMDID_READ_IMAGE, READ_IMAGE_VALUE_READ, 0, - imagno, + (char *)imagno, 8); if (ret < GP_OK) { free (data); return ret; } - gp_port_read(port, &data[current*0x1000], remain); + gp_port_read(port, (char *)&data[current*0x1000], remain); } @@ -192,7 +192,7 @@ int stv0674_get_image(GPPort *port, int image_no, CameraFile *file) gp_file_append(file, data, size); free(data); - ret = gp_port_usb_msg_write (port, CMDID_FINISH_READ, 0, 0, imagno, 4); + ret = gp_port_usb_msg_write (port, CMDID_FINISH_READ, 0, 0, (char *)imagno, 4); if (ret < GP_OK) return ret; |