Fix fuji camlib compilation warnings.

fuji.c: Resolve signed-unsigned compare issue. The variable 'i' is used in 'for' loop as array index counter. It is already used as unsigned integer in compares and a negative value would cause a segfault.
library.c: Resolve signed-unsigned compare issue. The variable 'i' is used in 'for' loop in a very simple way and is compared to an unsigned number already.
This commit is contained in:
Siim Meerits
2020-08-03 01:15:17 +03:00
committed by Marcus Meissner
parent 76e2a99ce3
commit 84d0a210d8
2 changed files with 2 additions and 2 deletions

View File

@@ -178,7 +178,7 @@ fuji_recv (Camera *camera, unsigned char *buf, unsigned int *buf_len,
unsigned char *last, GPContext *context)
{
unsigned char b[1024], check = 0;
int i;
unsigned int i;
/*
* Read the header. The checksum covers all bytes between

View File

@@ -165,7 +165,7 @@ file_list_func (CameraFilesystem *fs, const char *folder, CameraList *list,
void *data, GPContext *context)
{
Camera *camera = data;
int i;
unsigned int i;
unsigned int n;
const char *name;