From 767b08e66fef57327b9a2af023207b97300d42e2 Mon Sep 17 00:00:00 2001 From: Sebastian Rasmussen Date: Fri, 22 Jun 2012 01:29:17 +0200 Subject: 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. --- scripts/cmapdump.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'scripts') 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; } -- cgit v1.2.3