diff options
-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); } } |