[vlc-commits] Fix constness of psz_bgcolor. This fixes a compiler warning.

Cheng Sun git at videolan.org
Thu Jan 5 21:28:03 CET 2012


npapi-vlc | branch: master | Cheng Sun <chengsun9 at gmail.com> | Thu Jan  5 20:16:55 2012 +0000| [95115dab2bd1ad16f20d3ed11f9091bccd577ca1] | committer: Cheng Sun

Fix constness of psz_bgcolor. This fixes a compiler warning.

> http://git.videolan.org/gitweb.cgi/npapi-vlc.git/?a=commit;h=95115dab2bd1ad16f20d3ed11f9091bccd577ca1
---

 npapi/vlcplugin_base.cpp |    2 +-
 npapi/vlcplugin_base.h   |    2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/npapi/vlcplugin_base.cpp b/npapi/vlcplugin_base.cpp
index 3e83ede..5447fc6 100644
--- a/npapi/vlcplugin_base.cpp
+++ b/npapi/vlcplugin_base.cpp
@@ -495,7 +495,7 @@ NPError VlcPluginBase::init(int argc, char* const argn[], char* const argv[])
         }
         else if( !strcmp( argn[i], "bgcolor" ) )
         {
-            psz_bgcolor = argv[i];
+            psz_bgcolor = strdup( argv[i] );
         }
     }
 
diff --git a/npapi/vlcplugin_base.h b/npapi/vlcplugin_base.h
index 253cc69..d26e253 100644
--- a/npapi/vlcplugin_base.h
+++ b/npapi/vlcplugin_base.h
@@ -321,7 +321,7 @@ protected:
 
     /* display settings */
     NPWindow  npwindow;
-    char    *psz_bgcolor;
+    const char *psz_bgcolor;
 
     static void eventAsync(void *);
 



More information about the vlc-commits mailing list