diff options
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; |