diff options
author | Hans de Goede <hdegoede@redhat.com> | 2011-02-09 12:40:35 +0100 |
---|---|---|
committer | Peter Stuge <peter@stuge.se> | 2011-07-24 23:33:59 +0200 |
commit | a68f956dd4c29d6ed799f04f07a3346317843999 (patch) | |
tree | 65940cad256e15f59a050a5dde0e4317b0ac875e /examples/dpfp.c | |
parent | 209b5ccd827039b933b730e3f29abd0d72d3c6c6 (diff) | |
download | libusb-a68f956dd4c29d6ed799f04f07a3346317843999.tar.gz |
Linux: Fix warnings seen when compiling with gcc-4.6
Compiling with gcc-4.6 results in the following warnings:
os/linux_usbfs.c: In function 'op_get_configuration':
os/linux_usbfs.c:1144:6: warning: variable 'r' set but not used ...
os/linux_usbfs.c: In function 'op_handle_events':
os/linux_usbfs.c:2091:40: warning: 'status' may be used uninitialized ...
os/linux_usbfs.c:2044:6: note: 'status' was declared here
dpfp.c: In function 'save_to_file':
dpfp.c:228:9: warning: variable 'ignore' set but not used ...
dpfp_threaded.c: In function 'save_to_file':
dpfp_threaded.c:257:9: warning: variable 'ignore' set but not used ...
This patch fixes these. (The second comes from handle_control_completion()
which gcc seems to inline into op_handle_events().)
Signed-off-by: Hans de Goede <hdegoede@redhat.com>
[stuge: Add fixes for dpfp examples and update source references]
Diffstat (limited to 'examples/dpfp.c')
-rw-r--r-- | examples/dpfp.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c index 5127dde..1b3c3a4 100644 --- a/examples/dpfp.c +++ b/examples/dpfp.c @@ -225,7 +225,6 @@ static int save_to_file(unsigned char *data) { FILE *fd; char filename[64]; - size_t ignore; sprintf(filename, "finger%d.pgm", img_idx++); fd = fopen(filename, "w"); @@ -233,7 +232,7 @@ static int save_to_file(unsigned char *data) return -1; fputs("P5 384 289 255 ", fd); - ignore = fwrite(data + 64, 1, 384*289, fd); + (void) fwrite(data + 64, 1, 384*289, fd); fclose(fd); printf("saved image to %s\n", filename); return 0; |