From b5dc3d43e4729db2c681571efa1bd2e1ce65bb2f Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Fri, 31 May 2019 10:20:21 +1000 Subject: makesrna: quiet re-declared enum warning Note that BLI_STATIC_ASSERT use in headers is likely to cause this error again, we could have a version that takes a unique ID to be used in headers. --- source/blender/makesdna/intern/makesdna.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source/blender/makesdna') diff --git a/source/blender/makesdna/intern/makesdna.c b/source/blender/makesdna/intern/makesdna.c index 7e53231a547..80d37d89f14 100644 --- a/source/blender/makesdna/intern/makesdna.c +++ b/source/blender/makesdna/intern/makesdna.c @@ -902,9 +902,13 @@ static int calculate_struct_sizes(int firststruct, FILE *file_verify, const char fprintf(file_verify, "/* Verify struct sizes and member offsets are as expected by DNA. */\n"); fprintf(file_verify, "#include \"BLI_assert.h\"\n\n"); fprintf(file_verify, "#define DNA_DEPRECATED\n"); + /* Workaround enum naming collision in static asserts + * (ideally this included a unique name/id per file). */ + fprintf(file_verify, "#define assert_line_ assert_line_DNA_\n"); for (int i = 0; *(includefiles[i]) != '\0'; i++) { fprintf(file_verify, "#include \"%s%s\"\n", base_directory, includefiles[i]); } + fprintf(file_verify, "#undef assert_line_\n"); fprintf(file_verify, "\n"); /* Multiple iterations to handle nested structs. */ -- cgit v1.2.3