]> git.sesse.net Git - vlc/blobdiff - src/modules/cache.c
Cleanup contrib warning
[vlc] / src / modules / cache.c
index ef592bec75198b1e0ddb51f4c5bef238a9728c54..20108472bf0e3db55bf4a380755cbf04ad9c05cc 100644 (file)
@@ -59,7 +59,7 @@ static int    CacheLoadConfig  ( module_t *, FILE * );
 
 /* Sub-version number
  * (only used to avoid breakage in dev version when cache structure changes) */
-#define CACHE_SUBVERSION_NUM 16
+#define CACHE_SUBVERSION_NUM 18
 
 /* Cache filename */
 #define CACHE_NAME "plugins.dat"
@@ -199,10 +199,9 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r )
         uint16_t i_size;
         int i_submodules;
 
-        module = vlc_module_create();
+        module = vlc_module_create (NULL);
 
         /* Load additional infos */
-        LOAD_STRING(module->object_name);
         LOAD_STRING(module->psz_shortname);
         LOAD_STRING(module->psz_longname);
         LOAD_STRING(module->psz_help);
@@ -210,8 +209,6 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r )
         LOAD_IMMEDIATE(module->i_shortcuts);
         if (module->i_shortcuts > MODULE_SHORTCUT_MAX)
             goto error;
-        else if (module->i_shortcuts == 0)
-            module->pp_shortcuts = NULL;
         else
         {
             module->pp_shortcuts =
@@ -236,19 +233,14 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r )
 
         while( i_submodules-- )
         {
-            module_t *submodule = vlc_submodule_create (module);
-            free (submodule->object_name);
+            module_t *submodule = vlc_module_create (module);
             free (submodule->pp_shortcuts);
-            LOAD_STRING(submodule->object_name);
             LOAD_STRING(submodule->psz_shortname);
             LOAD_STRING(submodule->psz_longname);
-            LOAD_STRING(submodule->psz_help);
 
             LOAD_IMMEDIATE(submodule->i_shortcuts);
             if (submodule->i_shortcuts > MODULE_SHORTCUT_MAX)
                 goto error;
-            else if (submodule->i_shortcuts == 0)
-                submodule->pp_shortcuts = NULL;
             else
             {
                 submodule->pp_shortcuts =
@@ -259,8 +251,6 @@ size_t CacheLoad( vlc_object_t *p_this, const char *dir, module_cache_t **r )
 
             LOAD_STRING(submodule->psz_capability);
             LOAD_IMMEDIATE(submodule->i_score);
-            LOAD_IMMEDIATE(submodule->b_unloadable);
-            LOAD_STRING(submodule->domain);
         }
 
         char *path;
@@ -324,7 +314,6 @@ static int CacheLoadConfig( module_t *p_module, FILE *file )
         LOAD_STRING( p_module->p_config[i].psz_name );
         LOAD_STRING( p_module->p_config[i].psz_text );
         LOAD_STRING( p_module->p_config[i].psz_longtext );
-        LOAD_STRING( p_module->p_config[i].psz_oldname );
 
         if (IsConfigStringType (p_module->p_config[i].i_type))
         {
@@ -497,7 +486,6 @@ static int CacheSaveBank (FILE *file, const module_cache_t *cache,
         uint32_t i_submodule;
 
         /* Save additional infos */
-        SAVE_STRING(module->object_name);
         SAVE_STRING(module->psz_shortname);
         SAVE_STRING(module->psz_longname);
         SAVE_STRING(module->psz_help);
@@ -541,18 +529,14 @@ static int CacheSaveSubmodule( FILE *file, const module_t *p_module )
     if( CacheSaveSubmodule( file, p_module->next ) )
         goto error;
 
-    SAVE_STRING( p_module->object_name );
     SAVE_STRING( p_module->psz_shortname );
     SAVE_STRING( p_module->psz_longname );
-    SAVE_STRING( p_module->psz_help );
     SAVE_IMMEDIATE( p_module->i_shortcuts );
     for( unsigned j = 0; j < p_module->i_shortcuts; j++ )
          SAVE_STRING( p_module->pp_shortcuts[j] );
 
     SAVE_STRING( p_module->psz_capability );
     SAVE_IMMEDIATE( p_module->i_score );
-    SAVE_IMMEDIATE( p_module->b_unloadable );
-    SAVE_STRING( p_module->domain );
     return 0;
 
 error:
@@ -576,7 +560,6 @@ static int CacheSaveConfig (FILE *file, const module_t *p_module)
         SAVE_STRING( p_module->p_config[i].psz_name );
         SAVE_STRING( p_module->p_config[i].psz_text );
         SAVE_STRING( p_module->p_config[i].psz_longtext );
-        SAVE_STRING( p_module->p_config[i].psz_oldname );
 
         if (IsConfigStringType (p_module->p_config[i].i_type))
             SAVE_STRING( p_module->p_config[i].orig.psz );
@@ -653,9 +636,6 @@ module_t *CacheFind (module_cache_t *cache, size_t count,
        {
             module_t *module = cache->p_module;
             cache->p_module = NULL;
-
-            module->psz_filename = cache->path;
-            cache->path = NULL;
             return module;
        }
        cache++;