summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaiki Ueno <ueno@gnu.org>2020-09-18 17:42:16 +0200
committerDaiki Ueno <ueno@gnu.org>2020-09-18 17:42:16 +0200
commit885818b0c1b01eff1d7c204110be1bbcba6bc128 (patch)
tree9021ae9c268b73ef9e5b392f921fffd939a50d60
parent7cc74e5d08bbcef001bbed85470ed2b340a8cf2b (diff)
downloadgnutls-tmp-clock_nanosleep.tar.gz
inih: avoid cppcheck warningtmp-clock_nanosleep
"variableScope:lib/inih/ini.c:99,style,The scope of the variable 'start' can be reduced." Signed-off-by: Daiki Ueno <ueno@gnu.org>
-rw-r--r--lib/inih/ini.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/inih/ini.c b/lib/inih/ini.c
index a632d0a144..68a356f817 100644
--- a/lib/inih/ini.c
+++ b/lib/inih/ini.c
@@ -96,7 +96,6 @@ int ini_parse_stream(ini_reader reader, FILE* stream, ini_handler handler,
char section[MAX_SECTION] = "";
char prev_name[MAX_NAME] = "";
- char* start;
char* end;
char* name;
char* value;
@@ -118,6 +117,7 @@ int ini_parse_stream(ini_reader reader, FILE* stream, ini_handler handler,
/* Scan through stream line by line */
while (reader(line, max_line, stream) != NULL) {
+ char* start;
#if INI_ALLOW_REALLOC && !INI_USE_STACK
offset = strlen(line);
while (offset == max_line - 1 && line[offset - 1] != '\n') {