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:
committed by
Marcus Meissner
parent
76e2a99ce3
commit
84d0a210d8
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user