[vlc-devel] commit: libvlccore: Explicitely cast our const char *. dooh. We shouldn' t store them as char * in the first place if they are not strdup/free(). ( Pierre d'Herbemont )

git version control git at videolan.org
Wed Aug 13 00:54:39 CEST 2008


vlc | branch: master | Pierre d'Herbemont <pdherbemont at videolan.org> | Wed Aug 13 00:52:40 2008 +0200| [a35d4f85cedeabdc78de28a41e9b5211ae0e3812] | committer: Pierre d'Herbemont 

libvlccore: Explicitely cast our const char *. dooh. We shouldn't store them as char * in the first place if they are not strdup/free().

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

 src/modules/entry.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/modules/entry.c b/src/modules/entry.c
index 3c2628a..88ddce3 100644
--- a/src/modules/entry.c
+++ b/src/modules/entry.c
@@ -47,7 +47,7 @@ module_t *vlc_module_create (vlc_object_t *obj)
 
     module->b_reentrant = module->b_unloadable = true;
     module->psz_object_name = strdup( default_name );
-    module->psz_longname = default_name;
+    module->psz_longname = (char*)default_name;
     module->psz_capability = (char*)"";
     module->i_score = 1;
     module->i_config_items = module->i_bool_items = 0;
@@ -161,9 +161,9 @@ int vlc_module_set (module_t *module, int propid, ...)
             const char *value = va_arg (ap, const char *);
             free( module->psz_object_name );
             module->psz_object_name = strdup( value );
-            module->pp_shortcuts[0] = value;
+            module->pp_shortcuts[0] = (char*)value; /* dooh! */
             if (module->psz_longname == default_name)
-                module->psz_longname = value;
+                module->psz_longname = (char*)value; /* dooh! */
             break;
         }
 




More information about the vlc-devel mailing list