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/sx330z | |
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/sx330z')
-rw-r--r-- | camlibs/sx330z/sx330z.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/camlibs/sx330z/sx330z.c b/camlibs/sx330z/sx330z.c index 2964d177d..ffec82131 100644 --- a/camlibs/sx330z/sx330z.c +++ b/camlibs/sx330z/sx330z.c @@ -84,7 +84,7 @@ sx330z_init(Camera *camera, GPContext *context) /* struct traveler_ack ack;*/ uint8_t trxbuf[0x10]; int ret; - ret = gp_port_usb_msg_read(camera->port, USB_REQ_RESERVED, SX330Z_REQUEST_INIT, 0, trxbuf, 0x10); + ret = gp_port_usb_msg_read(camera->port, USB_REQ_RESERVED, SX330Z_REQUEST_INIT, 0, (char *)trxbuf, 0x10); if (ret != 0x10) return(GP_ERROR); /* more specific about error ? */ return(GP_OK); } /* sx330z_init */ @@ -101,13 +101,13 @@ sx330z_read_block(Camera *camera, GPContext *context, struct traveler_req *req, /* 1. send request */ sx330z_fill_req(trxbuf, req); ret = gp_port_usb_msg_write(camera->port, - USB_REQ_RESERVED, req->requesttype, 0, trxbuf, 0x20); + USB_REQ_RESERVED, req->requesttype, 0, (char *)trxbuf, 0x20); if (ret != 0x20) return(GP_ERROR_IO_WRITE); /* 2. read data */ - ret = gp_port_read(camera->port, buf, req->size); + ret = gp_port_read(camera->port, (char *)buf, req->size); if (ret != req->size)return(GP_ERROR_IO_READ); /* 3. read Ack */ - ret = gp_port_read(camera->port, trxbuf, 0x10); + ret = gp_port_read(camera->port, (char *)trxbuf, 0x10); if (ret != 0x10) return(GP_ERROR); /* FIXME : Security check ???*/ return(GP_OK); @@ -125,7 +125,7 @@ sx330z_get_toc_num_pages(Camera *camera, GPContext *context, int32_t *pages) int ret; ret=gp_port_usb_msg_read(camera->port, - USB_REQ_RESERVED,SX330Z_REQUEST_TOC_SIZE, 0, trxbuf, 0x10); + USB_REQ_RESERVED,SX330Z_REQUEST_TOC_SIZE, 0, (char *)trxbuf, 0x10); if (ret != 0x10) return(GP_ERROR); sx330z_fill_ack(trxbuf, &ack); /* convert endianness */ |