diff options
Diffstat (limited to 'clang/tools/c-index-test/c-index-test.c')
-rw-r--r-- | clang/tools/c-index-test/c-index-test.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/clang/tools/c-index-test/c-index-test.c b/clang/tools/c-index-test/c-index-test.c index ceb2ef6..d030bbf 100644 --- a/clang/tools/c-index-test/c-index-test.c +++ b/clang/tools/c-index-test/c-index-test.c @@ -739,7 +739,10 @@ static CXString CursorToText(CXCursor Cursor) { } } assert(0 && "unknown display type"); /* no llvm_unreachable in C. */ - return /*garbage*/ text; + // Set to NULL to prevent uninitialized variable warnings. + text.data = NULL; + text.private_flags = 0; + return text; } static void PrintCursor(CXCursor Cursor, const char *CommentSchemaFile) { |