Cleanup: quiet undeclared variable warning
authorCampbell Barton <ideasman42@gmail.com>
Sat, 23 Feb 2019 08:16:28 +0000 (19:16 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Sat, 23 Feb 2019 08:20:20 +0000 (19:20 +1100)
source/blender/makesdna/intern/makesdna.c

index 1607e5e..cd38ba1 100644 (file)
@@ -141,7 +141,7 @@ static const char *includefiles[] = {
 /** \name Variables
  * \{ */
 
-MemArena *mem_arena = NULL;
+static MemArena *mem_arena = NULL;
 
 static int maxdata = 500000, maxnr = 50000;
 static int nr_names = 0;
@@ -1349,6 +1349,7 @@ int main(int argc, char **argv)
                                baseDirectory = BASE_HEADER;
                        }
 
+                       fprintf(file_dna, "extern const unsigned char DNAstr[];\n");
                        fprintf(file_dna, "const unsigned char DNAstr[] = {\n");
                        if (make_structDNA(baseDirectory, file_dna, file_dna_offsets)) {
                                /* error */
@@ -1359,6 +1360,7 @@ int main(int argc, char **argv)
                        }
                        else {
                                fprintf(file_dna, "};\n");
+                               fprintf(file_dna, "extern const int DNAlen;\n");
                                fprintf(file_dna, "const int DNAlen = sizeof(DNAstr);\n");
                        }
                }