[vlc-devel] [PATCH 2/3] Fixed warning for uninitialized variable

Ian Chamberlain ian.h.chamberlain at gmail.com
Sun Mar 1 09:02:22 CET 2015


This was an uninitialized variable, as far as I could tell there was no reason not to initialize it to NULL in these two cases.
---
 src/text/strings.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/text/strings.c b/src/text/strings.c
index 33f30d4..b2f21a0 100644
--- a/src/text/strings.c
+++ b/src/text/strings.c
@@ -536,8 +536,10 @@ char *str_format_meta(input_thread_t *input, const char *s)
     FILE *stream = open_memstream(&str, &len);
 #elif defined( _WIN32 )
     FILE *stream = vlc_win32_tmpfile();
+    str = NULL;
 #else
     FILE *stream = tmpfile();
+    str = NULL;
 #endif
     if (stream == NULL)
         return NULL;
-- 
2.3.1




More information about the vlc-devel mailing list