Commit c2632348 authored by Rémi Denis-Courmont's avatar Rémi Denis-Courmont

Fix a few warnings

(struct should be fully initialized)
parent 96c8e7b7
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* This file describes the programming interface for the configuration module. * This file describes the programming interface for the configuration module.
* It includes functions allowing to declare, get or set configuration options. * It includes functions allowing to declare, get or set configuration options.
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000 the VideoLAN team * Copyright (C) 1999-2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Gildas Bazin <gbazin@videolan.org> * Authors: Gildas Bazin <gbazin@videolan.org>
...@@ -216,7 +216,7 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -216,7 +216,7 @@ int config_AutoSaveConfigFile( vlc_object_t * );
/***************************************************************************** /*****************************************************************************
* Macros used to build the configuration structure. * Macros used to build the configuration structure.
* *
* Note that internally we support only 3 types of config data: int , float * Note that internally we support only 3 types of config data: int, float
* and string. * and string.
* The other types declared here just map to one of these 3 basic types but * The other types declared here just map to one of these 3 basic types but
* have the advantage of also providing very good hints to a configuration * have the advantage of also providing very good hints to a configuration
...@@ -230,13 +230,19 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -230,13 +230,19 @@ int config_AutoSaveConfigFile( vlc_object_t * );
i_config++; \ i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \ (i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_CATEGORY, NULL, NULL , '\0', NULL, NULL, NULL, i_id }; p_config[ i_config ] = tmp; } { static module_config_t tmp = { CONFIG_CATEGORY, NULL, NULL , '\0', \
NULL, NULL, NULL, i_id, 0., 0, 0, 0., 0., NULL, NULL, NULL, NULL, \
NULL, 0, NULL, NULL, 0, NULL, VLC_FALSE, NULL, VLC_FALSE, VLC_FALSE, \
NULL, 0, 0., NULL, 0, 0., VLC_FALSE }; p_config[ i_config ] = tmp; }
#define set_subcategory( i_id ) \ #define set_subcategory( i_id ) \
i_config++; \ i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \ (i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_SUBCATEGORY, NULL, NULL , '\0', NULL, NULL, NULL, i_id }; p_config[ i_config ] = tmp; } { static module_config_t tmp = { CONFIG_SUBCATEGORY, NULL, NULL , '\0', \
NULL, NULL, NULL, i_id, 0., 0, 0, 0., 0., NULL, NULL, NULL, NULL, \
NULL, 0, NULL, NULL, 0, NULL, VLC_FALSE, NULL, VLC_FALSE, VLC_FALSE, \
NULL, 0, 0., NULL, 0, 0., VLC_FALSE }; p_config[ i_config ] = tmp; }
#define set_section( text, longtext) \ #define set_section( text, longtext) \
i_config++; \ i_config++; \
...@@ -248,13 +254,21 @@ int config_AutoSaveConfigFile( vlc_object_t * ); ...@@ -248,13 +254,21 @@ int config_AutoSaveConfigFile( vlc_object_t * );
i_config++; \ i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \ (i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; p_config[i_config].b_advanced = advc; } { static module_config_t tmp = { CONFIG_HINT_CATEGORY, NULL, NULL, \
'\0', text, longtext, NULL, 0, 0., 0, 0, 0., 0., NULL, NULL, \
NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, VLC_FALSE, NULL, \
VLC_FALSE, VLC_FALSE, NULL, 0, 0., NULL, 0, 0., VLC_FALSE }; \
p_config[ i_config ] = tmp; p_config[i_config].b_advanced = advc; }
#define add_subcategory_hint( text, longtext ) \ #define add_subcategory_hint( text, longtext ) \
i_config++; \ i_config++; \
if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \ if(!(i_config%10)) p_config = (module_config_t* )realloc(p_config, \
(i_config+11) * sizeof(module_config_t)); \ (i_config+11) * sizeof(module_config_t)); \
{ static module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, '\0', text, longtext }; p_config[ i_config ] = tmp; } { static module_config_t tmp = { CONFIG_HINT_SUBCATEGORY, NULL, NULL, \
'\0', text, longtext, NULL, 0, 0., 0, 0, 0., 0., NULL, NULL, \
NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, VLC_FALSE, NULL, \
VLC_FALSE, VLC_FALSE, NULL, 0, 0., NULL, 0, 0., VLC_FALSE }; \
p_config[ i_config ] = tmp; }
#define end_subcategory_hint \ #define end_subcategory_hint \
......
/***************************************************************************** /*****************************************************************************
* modules_inner.h : Macros used from within a module. * modules_inner.h : Macros used from within a module.
***************************************************************************** *****************************************************************************
* Copyright (C) 2001 the VideoLAN team * Copyright (C) 2001-2006 the VideoLAN team
* $Id$ * $Id$
* *
* Authors: Samuel Hocevar <sam@zoy.org> * Authors: Samuel Hocevar <sam@zoy.org>
...@@ -99,7 +99,12 @@ ...@@ -99,7 +99,12 @@
{ \ { \
int i_shortcut = 1, i_config = -1; \ int i_shortcut = 1, i_config = -1; \
module_config_t *p_config = NULL; \ module_config_t *p_config = NULL; \
static module_config_t config_end = {CONFIG_HINT_END}; \ static module_config_t config_end = { \
CONFIG_HINT_END, NULL, NULL, 0, NULL, NULL, NULL, 0, 0., 0, 0, \
0., 0., NULL, NULL, NULL, NULL, NULL, 0, NULL, NULL, 0, NULL, \
VLC_FALSE, NULL, VLC_FALSE, VLC_FALSE, NULL, 0, 0., NULL, 0, 0., \
VLC_FALSE \
}; \
STORE_SYMBOLS; \ STORE_SYMBOLS; \
p_module->b_submodule = VLC_FALSE; \ p_module->b_submodule = VLC_FALSE; \
p_module->b_unloadable = VLC_TRUE; \ p_module->b_unloadable = VLC_TRUE; \
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment