From 9771254f052ca5c9ddaab18ae7d98a9798d08f8b Mon Sep 17 00:00:00 2001 From: David Gobbi Date: Wed, 26 Nov 2014 08:42:25 -0700 Subject: [PATCH] Before c99, variable decls go before other statements. Change-Id: I949d737991fabc7f186f90273c38a590dde25241 --- Wrapping/Tools/vtkParsePreprocess.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Wrapping/Tools/vtkParsePreprocess.c b/Wrapping/Tools/vtkParsePreprocess.c index d9f4491ecc8..f063c0f4399 100644 --- a/Wrapping/Tools/vtkParsePreprocess.c +++ b/Wrapping/Tools/vtkParsePreprocess.c @@ -275,8 +275,8 @@ static MacroInfo **preproc_macro_location( /* if n+1 is a power of two, double allocated space */ if (n > 0 && (n & (n+1)) == 0) { - hptr = htable[i]; MacroInfo **oldhptr = hptr; + hptr = htable[i]; hptr = (MacroInfo **)realloc(hptr, (2*(n+1))*sizeof(MacroInfo *)); if (!hptr) { @@ -1560,8 +1560,8 @@ const char *preproc_find_include_file( { if (m+1 > outputsize) { - outputsize += m+1; char *oldoutput = output; + outputsize += m+1; output = (char *)realloc(output, outputsize); if (!output) { @@ -1621,8 +1621,8 @@ const char *preproc_find_include_file( } if (m+j+1 > outputsize) { - outputsize += m+j+1; char *oldoutput = output; + outputsize += m+j+1; output = (char *)realloc(output, outputsize); if (!output) { @@ -1641,8 +1641,8 @@ const char *preproc_find_include_file( { if (m+1 > outputsize) { - outputsize += m+1; char *oldoutput = output; + outputsize += m+1; output = (char *)realloc(output, outputsize); if (!output) { @@ -1661,8 +1661,8 @@ const char *preproc_find_include_file( j = strlen(directory); if (j + m + 2 > outputsize) { - outputsize += j+m+2; char *oldoutput = output; + outputsize += j+m+2; output = (char *)realloc(output, outputsize); if (!output) { @@ -1745,8 +1745,8 @@ void preproc_escape_string( /* expand line buffer as necessary */ while (j+4 > linelen) { - linelen *= 2; char *oldline = line; + linelen *= 2; line = (char *)realloc(line, linelen); if (!line) { @@ -1948,8 +1948,8 @@ static int preproc_include_file( /* expand line buffer as necessary */ while (j+4 > linelen) { - linelen *= 2; char *oldline = line; + linelen *= 2; line = (char *)realloc(line, linelen); if (!line) { -- GitLab