diff options
Diffstat (limited to 'libgphoto2')
-rw-r--r-- | libgphoto2/gphoto2-file.c | 10 | ||||
-rw-r--r-- | libgphoto2/gphoto2-filesys.c | 4 |
2 files changed, 7 insertions, 7 deletions
diff --git a/libgphoto2/gphoto2-file.c b/libgphoto2/gphoto2-file.c index cdd671f3d..b51957497 100644 --- a/libgphoto2/gphoto2-file.c +++ b/libgphoto2/gphoto2-file.c @@ -409,7 +409,7 @@ gp_file_get_data_and_size (CameraFile *file, const char **data, break; case GP_FILE_ACCESSTYPE_FD: { off_t offset; - unsigned long int curread = 0; + off_t curread = 0; if (-1 == lseek (file->fd, 0, SEEK_END)) { if (errno == EBADF) return GP_ERROR_IO; @@ -504,7 +504,7 @@ gp_file_save (CameraFile *file, const char *filename) break; case GP_FILE_ACCESSTYPE_FD: { char *data; - unsigned long int curread = 0; + off_t curread = 0; off_t offset; if (-1 == lseek (file->fd, 0, SEEK_END)) @@ -537,7 +537,7 @@ gp_file_save (CameraFile *file, const char *filename) unlink (filename); return GP_ERROR_IO_READ; } - if (fwrite (data, 1, res, fp) != res) { + if ((int)fwrite (data, 1, res, fp) != res) { GP_LOG_E ("Not enough space on device in order to save '%s'.", filename); free (data); fclose (fp); @@ -750,7 +750,7 @@ gp_file_copy (CameraFile *destination, CameraFile *source) (source->accesstype == GP_FILE_ACCESSTYPE_FD) ) { off_t offset; - unsigned long int curread = 0; + off_t curread = 0; free (destination->data); destination->data = NULL; @@ -799,7 +799,7 @@ gp_file_copy (CameraFile *destination, CameraFile *source) lseek (source->fd, 0, SEEK_SET); C_MEM (data = malloc (65536)); while (1) { - unsigned long curwritten = 0; + ssize_t curwritten = 0; ssize_t res; res = read (source->fd, data, 65536); diff --git a/libgphoto2/gphoto2-filesys.c b/libgphoto2/gphoto2-filesys.c index 7f4314093..a5abb7e1f 100644 --- a/libgphoto2/gphoto2-filesys.c +++ b/libgphoto2/gphoto2-filesys.c @@ -411,7 +411,7 @@ lookup_folder ( while (f) { if (s) { if (!strncmp(f->name,curpt, (s-curpt)) && - (strlen(f->name) == (s-curpt)) + ((ssize_t)strlen(f->name) == (s-curpt)) ) { folder = f; curpt = s; @@ -553,7 +553,7 @@ append_to_folder (CameraFilesystemFolder *folder, while (f) { if (s) { if (!strncmp(f->name,foldername, (s-foldername)) && - (strlen(f->name) == (s-foldername)) + ((ssize_t)strlen(f->name) == (s-foldername)) ) return append_to_folder (f, s+1, newfolder); } else { |