libloguru: Fix coverity(uninit_use_in_call) 21/258721/2
authorWoochanlee <wc0917.lee@samsung.com>
Tue, 25 May 2021 01:56:25 +0000 (10:56 +0900)
committerwoochan lee <wc0917.lee@samsung.com>
Tue, 25 May 2021 03:23:37 +0000 (03:23 +0000)
Change-Id: Ib5a5658e4c16256dff7b986251503788c8cfe2a9
CID:1227411

libloguru/src/loguru.cpp

index 06ae87cbc47a8e612d71b8bc292e303769d1bc61..004278918baa5ea568452ea5ce8b81c08646be87 100644 (file)
@@ -1053,7 +1053,7 @@ namespace loguru
        std::string stacktrace_as_stdstring(int skip)
        {
                // From https://gist.github.com/fmela/591333
-               void* callstack[128];
+               void* callstack[128] = {0};
                const auto max_frames = sizeof(callstack) / sizeof(callstack[0]);
                int num_frames = backtrace(callstack, max_frames);
                char** symbols = backtrace_symbols(callstack, num_frames);
@@ -1792,4 +1792,4 @@ namespace loguru
 
 #endif // _WIN32
 
-#endif // LOGURU_IMPLEMENTATION
\ No newline at end of file
+#endif // LOGURU_IMPLEMENTATION