From 1b103fb6979e85c8978401e199038dd5311cd4ab Mon Sep 17 00:00:00 2001 From: devzero2000 Date: Wed, 8 Jan 2014 09:33:42 +0000 Subject: poptconfig.c reduce variables scope (cppcheck warning) --- CHANGES | 1 + poptconfig.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 58145aa..242ee46 100644 --- a/CHANGES +++ b/CHANGES @@ -1,4 +1,5 @@ 1.17 -> 2.0: + - devzero2000: poptconfig.c reduce variables scope (cppcheck warning) - devzero2000: add cppcheck conditional makefile target - devzero2000: drop expr syntax error in make check under dash - devzero2000: Print to the end of the configure phase the options we have diff --git a/poptconfig.c b/poptconfig.c index 63804d5..ad33eba 100644 --- a/poptconfig.c +++ b/poptconfig.c @@ -167,7 +167,6 @@ int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags) int fdno; char * b = NULL; off_t nb = 0; - char * s, * t, * se; int rc = POPT_ERROR_ERRNO; /* assume failure */ fdno = open(fn, O_RDONLY); @@ -197,6 +196,7 @@ int poptReadFile(const char * fn, char ** bp, size_t * nbp, int flags) if (flags & POPT_READFILE_TRIMNEWLINES) /*@=bitwisesigned@*/ { + char * s, * t, * se; for (t = b, s = b, se = b + nb; *s && s < se; s++) { switch (*s) { case '\\': -- cgit v1.2.1