From: <mar...@us...> - 2013-10-10 15:13:29
|
Revision: 14565 http://sourceforge.net/p/gphoto/code/14565 Author: marcusmeissner Date: 2013-10-10 15:13:26 +0000 (Thu, 10 Oct 2013) Log Message: ----------- made some variables unsigned to avoid signed!=unsigned warnings Modified Paths: -------------- trunk/libgphoto2/camlibs/pentax/pslr.c Modified: trunk/libgphoto2/camlibs/pentax/pslr.c =================================================================== --- trunk/libgphoto2/camlibs/pentax/pslr.c 2013-10-10 14:56:15 UTC (rev 14564) +++ trunk/libgphoto2/camlibs/pentax/pslr.c 2013-10-10 15:13:26 UTC (rev 14565) @@ -600,7 +600,7 @@ uint32_t pslr_buffer_read(pslr_handle_t h, uint8_t *buf, uint32_t size) { ipslr_handle_t *p = (ipslr_handle_t *) h; - int i; + unsigned int i; uint32_t pos = 0; uint32_t seg_offs; uint32_t addr; @@ -637,7 +637,7 @@ uint32_t pslr_buffer_get_size(pslr_handle_t h) { ipslr_handle_t *p = (ipslr_handle_t *) h; - int i; + unsigned int i; uint32_t len = 0; for (i=0; i<p->segment_count; i++) { len += p->segments[i].length; @@ -1155,7 +1155,7 @@ { uint8_t idbuf[8]; int n; - int i; + unsigned int i; CHECK(command(p, 0, 4, 0)); n = get_result(p); @@ -1292,7 +1292,7 @@ static int read_result(ipslr_handle_t *p, uint8_t *buf, uint32_t n) { uint8_t cmd[8] = { 0xf0, 0x49, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; - int r; + unsigned int r; cmd[4] = n; cmd[5] = n >> 8; cmd[6] = n >> 16; @@ -1305,7 +1305,8 @@ void hexdump(uint8_t *buf, uint32_t bufLen) { - int i; + unsigned int i; + for (i=0; i<bufLen; i++) { if (i%16 == 0) DPRINT("0x%04x | ", i); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |