diff options
author | portix <portix@gmx.net> | 2013-05-20 16:34:04 +0200 |
---|---|---|
committer | portix <portix@gmx.net> | 2013-05-20 16:34:04 +0200 |
commit | e190d07107df91609fc640ffee3a0b3ac65f031b (patch) | |
tree | c092a282a5f0079512c052798e15b68c525a1a04 | |
parent | a4506493a725923ae05dd43e0d9b438b495b36a6 (diff) | |
download | dwb-e190d07107df91609fc640ffee3a0b3ac65f031b.zip |
Fixing unused-result error in main.c, closing #317
-rw-r--r-- | exar/Makefile | 2 | ||||
-rw-r--r-- | exar/main.c | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/exar/Makefile b/exar/Makefile index ccf0c880..3faaf17f 100644 --- a/exar/Makefile +++ b/exar/Makefile @@ -1,4 +1,4 @@ -CFLAGS += -Wall -pedantic -Werror -std=c99 -g +CFLAGS += -Wall -pedantic -Werror -Wextra -std=c99 -g TARGET=exar OBJ=$(patsubst %.c, %.o, $(wildcard *.c)) diff --git a/exar/main.c b/exar/main.c index b1f354c5..297c118e 100644 --- a/exar/main.c +++ b/exar/main.c @@ -80,7 +80,10 @@ extract(const char *archive, const char *path, unsigned char *content = extract_func(archive, path, &s); if (content != NULL) { - fwrite(content, 1, s, stdout); + if (fwrite(content, 1, s, stdout) != (size_t)s) + { + fprintf(stderr, "An error occured\n"); + } free(content); } } |