summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2012-06-22 01:29:17 +0200
committerTor Andersson <tor.andersson@artifex.com>2012-06-25 13:50:12 +0200
commit767b08e66fef57327b9a2af023207b97300d42e2 (patch)
tree18a5cfd3ff51125be3881bc19b28e8da8650fdbc /scripts
parent0772da1a2ca814919428a8eca995b2d776eff41f (diff)
downloadmupdf-767b08e66fef57327b9a2af023207b97300d42e2.tar.xz
Warning fixes and various clean ups:
Remove unused variable, silencing compiler warning. No need to initialize variables twice. Remove initialization of unread variable. Remove unnecessary check for NULL. Close output file upon error in cmapdump.
Diffstat (limited to 'scripts')
-rw-r--r--scripts/cmapdump.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/scripts/cmapdump.c b/scripts/cmapdump.c
index 53247339..2a83533e 100644
--- a/scripts/cmapdump.c
+++ b/scripts/cmapdump.c
@@ -78,6 +78,11 @@ main(int argc, char **argv)
if (strlen(realname) > (sizeof name - 1))
{
fprintf(stderr, "cmapdump: file name too long\n");
+ if (fclose(fo))
+ {
+ fprintf(stderr, "cmapdump: could not close output file '%s'\n", argv[1]);
+ return 1;
+ }
return 1;
}