Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
c2632348
Commit
c2632348
authored
Apr 02, 2006
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a few warnings
(struct should be fully initialized)
parent
96c8e7b7
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
27 additions
and
8 deletions
+27
-8
include/configuration.h
include/configuration.h
+20
-6
include/modules_inner.h
include/modules_inner.h
+7
-2
No files found.
include/configuration.h
View file @
c2632348
...
@@ -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 \
...
...
include/modules_inner.h
View file @
c2632348
/*****************************************************************************
/*****************************************************************************
* 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; \
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment