summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorPeter Stuge <peter@stuge.se>2010-10-16 14:22:30 +0200
committerPeter Stuge <peter@stuge.se>2010-10-16 14:22:30 +0200
commit678c242705b29f9cb6cc421b5625a6485ae58047 (patch)
tree75c7cd2245dec4530cbb045935c8c476989d0c37 /examples
parent9cd9059bf9baac69a9d6c909f4c1e000592fa260 (diff)
downloadlibusb-678c242705b29f9cb6cc421b5625a6485ae58047.tar.gz
examples: Silence warnings about return value of fwrite()
Diffstat (limited to 'examples')
-rw-r--r--examples/dpfp.c3
-rw-r--r--examples/dpfp_threaded.c3
2 files changed, 4 insertions, 2 deletions
diff --git a/examples/dpfp.c b/examples/dpfp.c
index af51e0f..a35a373 100644
--- a/examples/dpfp.c
+++ b/examples/dpfp.c
@@ -225,6 +225,7 @@ 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");
@@ -232,7 +233,7 @@ static int save_to_file(unsigned char *data)
return -1;
fputs("P5 384 289 255 ", fd);
- fwrite(data + 64, 1, 384*289, fd);
+ ignore = fwrite(data + 64, 1, 384*289, fd);
fclose(fd);
printf("saved image to %s\n", filename);
return 0;
diff --git a/examples/dpfp_threaded.c b/examples/dpfp_threaded.c
index 4641a50..7b98192 100644
--- a/examples/dpfp_threaded.c
+++ b/examples/dpfp_threaded.c
@@ -254,6 +254,7 @@ 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");
@@ -261,7 +262,7 @@ static int save_to_file(unsigned char *data)
return -1;
fputs("P5 384 289 255 ", fd);
- fwrite(data + 64, 1, 384*289, fd);
+ ignore = fwrite(data + 64, 1, 384*289, fd);
fclose(fd);
printf("saved image to %s\n", filename);
return 0;