[xiph-commits] r3420 - liboggplay/trunk/plugin

johnf at svn.annodex.net johnf at svn.annodex.net
Fri Feb 8 23:46:42 PST 2008


Author: johnf
Date: 2008-02-08 23:46:40 -0800 (Fri, 08 Feb 2008)
New Revision: 3420

Modified:
   liboggplay/trunk/plugin/plugin.cpp
Log:
Make the following new gcc warning go away: warning: deprecated conversion from string constant to ?\226?\128?\152char*?\226?\128?\153'

Modified: liboggplay/trunk/plugin/plugin.cpp
===================================================================
--- liboggplay/trunk/plugin/plugin.cpp	2008-02-09 04:21:25 UTC (rev 3419)
+++ liboggplay/trunk/plugin/plugin.cpp	2008-02-09 07:46:40 UTC (rev 3420)
@@ -91,20 +91,25 @@
 
 char* NPP_GetMIMEDescription(void)
 {
-    return(MIME_TYPES_DESCRIPTION);
+    static char s[] = MIME_TYPES_DESCRIPTION;
+
+    return s;
 }
 
 // get values per plugin
 NPError 
 NS_PluginGetValue(NPPVariable aVariable, void *aValue)
 {
+  static char pluginName[] = PLUGIN_NAME;
+  static char pluginDescription[] = PLUGIN_NAME;
+
   NPError err = NPERR_NO_ERROR;
   switch (aVariable) {
     case NPPVpluginNameString:
-      *((char **)aValue) = PLUGIN_NAME;
+      *((char **)aValue) = pluginName;
       break;
     case NPPVpluginDescriptionString:
-      *((char **)aValue) = PLUGIN_DESCRIPTION;
+      *((char **)aValue) = pluginDescription;
       break;
     default:
       err = NPERR_INVALID_PARAM;



More information about the commits mailing list