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/kodak | |
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/kodak')
-rw-r--r-- | camlibs/kodak/dc120/library.c | 2 | ||||
-rw-r--r-- | camlibs/kodak/dc210/library.c | 20 | ||||
-rw-r--r-- | camlibs/kodak/dc3200/library.c | 8 | ||||
-rw-r--r-- | camlibs/kodak/ez200/ez200.c | 2 |
4 files changed, 16 insertions, 16 deletions
diff --git a/camlibs/kodak/dc120/library.c b/camlibs/kodak/dc120/library.c index 919f2d710..93dcc878a 100644 --- a/camlibs/kodak/dc120/library.c +++ b/camlibs/kodak/dc120/library.c @@ -86,7 +86,7 @@ write_again: /* Read in the response from the camera if requested */ if (read_response) { - if (gp_port_read(camera->port, in, 1) < GP_OK) + if (gp_port_read(camera->port, (char *)in, 1) < GP_OK) /* On error, write again */ goto write_again; diff --git a/camlibs/kodak/dc210/library.c b/camlibs/kodak/dc210/library.c index 3d99d3e0a..a2477200e 100644 --- a/camlibs/kodak/dc210/library.c +++ b/camlibs/kodak/dc210/library.c @@ -166,7 +166,7 @@ static int dc210_write_single_char int i; for (i=0; i< RETRIES; i++){ - if (gp_port_write(camera->port, &response, 1) >= 0) + if (gp_port_write(camera->port, (char *)&response, 1) >= 0) return (GP_OK); }; @@ -185,7 +185,7 @@ static int dc210_read_single_char for (i = 0; i < RETRIES; i++){ - error = gp_port_read(camera->port, response, 1); + error = gp_port_read(camera->port, (char *)response, 1); if (error < 0){ if (error == GP_ERROR_TIMEOUT) @@ -238,7 +238,7 @@ static int dc210_execute_command }; for (k = 0; k < RETRIES; k++){ - error = gp_port_read(camera->port, &response, 1); + error = gp_port_read(camera->port, (char *)&response, 1); if (error != 1){ if (error == GP_ERROR_TIMEOUT){ dc210_cmd_error = DC210_TIMEOUT_ERROR; @@ -307,7 +307,7 @@ static int dc210_write_command_packet /* read answer */ - error = gp_port_read(camera->port, &answer, 1); + error = gp_port_read(camera->port, (char *)&answer, 1); if (error < 0) return GP_ERROR; @@ -388,7 +388,7 @@ static int dc210_read_single_block error = 1; for (k = 0; k < RETRIES; k++){ - if (gp_port_read(camera->port, b, blocksize) < 0){ + if (gp_port_read(camera->port, (char *)b, blocksize) < 0){ continue; }; error = 0; @@ -443,7 +443,7 @@ static int dc210_read_to_file fatal_error = 1; for (k = 0; k < RETRIES; k++){ /* read packet */ - if (gp_port_read(camera->port, b, blocksize) < 0){ + if (gp_port_read(camera->port, (char *)b, blocksize) < 0){ dc210_write_single_char(camera, DC210_ILLEGAL_PACKET); packet_following = dc210_wait_for_response(camera, 0, NULL); continue; @@ -625,8 +625,8 @@ static int dc210_format_card (Camera * camera, char * album_name, GPContext * co dc210_write_command_packet(camera, data); if (dc210_wait_for_response(camera, 3, context) != DC210_PACKET_FOLLOWING) return GP_ERROR; - gp_port_read(camera->port, answer, 16); - gp_port_read(camera->port, &checksum_read, 1); + gp_port_read(camera->port, (char *)answer, 16); + gp_port_read(camera->port, (char *)&checksum_read, 1); checksum = 0; for (i = 0; i < 16; i++) checksum ^= answer[i]; @@ -658,8 +658,8 @@ static int dc210_get_card_status (Camera * camera, dc210_card_status * card_stat dc210_execute_command(camera, cmd); if (dc210_wait_for_response(camera, 0, NULL) != DC210_PACKET_FOLLOWING) return GP_ERROR; - gp_port_read(camera->port, answer, 16); - gp_port_read(camera->port, &checksum_read, 1); + gp_port_read(camera->port, (char *)answer, 16); + gp_port_read(camera->port, (char *)&checksum_read, 1); checksum = 0; for (i = 0; i < 16; i++) checksum ^= answer[i]; diff --git a/camlibs/kodak/dc3200/library.c b/camlibs/kodak/dc3200/library.c index e1f6434c8..f3b3c744b 100644 --- a/camlibs/kodak/dc3200/library.c +++ b/camlibs/kodak/dc3200/library.c @@ -633,7 +633,7 @@ int dc3200_send_packet(Camera *camera, unsigned char *data, int data_len) #ifdef DEBUG dump_buffer(buff, buff_len, "s", 16); #endif - res = gp_port_write(camera->port, buff, data_len + 3); + res = gp_port_write(camera->port, (char *)buff, data_len + 3); free(buff); return res; } @@ -665,7 +665,7 @@ int dc3200_recv_packet(Camera *camera, unsigned char *data, int *data_len) * */ - res = gp_port_read(camera->port, &buff[num_read], 1); + res = gp_port_read(camera->port, (char *)&buff[num_read], 1); while(res >= 0 && fails < READ_RETRIES) { if(res == 0) { @@ -685,7 +685,7 @@ int dc3200_recv_packet(Camera *camera, unsigned char *data, int *data_len) break; } } - res = gp_port_read(camera->port, &buff[num_read], 1); + res = gp_port_read(camera->port, (char *)&buff[num_read], 1); } if(!complete) { @@ -939,7 +939,7 @@ int dc3200_clear_read_buffer(Camera *camera) gp_port_set_timeout(camera->port, 0); - while(gp_port_read(camera->port, &byte, 1) > 0) + while(gp_port_read(camera->port, (char *)&byte, 1) > 0) count++; if(count > 0) diff --git a/camlibs/kodak/ez200/ez200.c b/camlibs/kodak/ez200/ez200.c index a4bcadfdf..5428f5253 100644 --- a/camlibs/kodak/ez200/ez200.c +++ b/camlibs/kodak/ez200/ez200.c @@ -108,7 +108,7 @@ ez200_get_picture_size (GPPort *port, int n) { GP_DEBUG("Running ez200_get_picture_size"); - READ(port, PICTURE, n, 1, c, 3); + READ(port, PICTURE, n, 1, (char *)c, 3); size = (int)c[0] + (int)c[1]*0x100 + (int)c[2]*0x10000; GP_DEBUG(" size of picture %i is 0x%x = %i byte(s)", n, size, size); |