[vlc-devel] commit: Properly initialize psz_name in PrintObject(). Fixes a warning: " Conditional jump or move depends on uninitialised values" (Jean-Paul Saman )

git version control git at videolan.org
Wed Apr 16 15:06:20 CEST 2008


vlc | branch: master | Jean-Paul Saman <jean-paul.saman at m2x.nl> | Wed Apr 16 14:42:45 2008 +0200| [8e49a4ee9139dd5bde823cf87ced9189081a0f65]

Properly initialize psz_name in PrintObject(). Fixes a warning: "Conditional jump or move depends on uninitialised values"

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=8e49a4ee9139dd5bde823cf87ced9189081a0f65
---

 src/misc/objects.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/src/misc/objects.c b/src/misc/objects.c
index 4b8df6b..ce6314f 100644
--- a/src/misc/objects.c
+++ b/src/misc/objects.c
@@ -1469,7 +1469,7 @@ static void PrintObject( vlc_object_t *p_this, const char *psz_prefix )
     char psz_children[20], psz_refcount[20], psz_thread[30], psz_name[50],
          psz_parent[20];
 
-    psz_name[0] = '\0';
+    memset( &psz_name, 0, sizeof(psz_name) );
     if( p_this->psz_object_name )
     {
         snprintf( psz_name, 49, " \"%s\"", p_this->psz_object_name );




More information about the vlc-devel mailing list