Skip to content
Snippets Groups Projects
Commit 52707fba authored by Jaco Kroon's avatar Jaco Kroon Committed by Joshua Colp
Browse files

app.h: Fix -Werror=zero-length-bounds compile errors in dev mode.


Change-Id: I5c104dc1f8417ccd3d01faf86e84ccbf89bc3b31
Signed-off-by: default avatarJaco Kroon <jaco@uls.co.za>
parent 94debe50
No related branches found
No related tags found
No related merge requests found
...@@ -1215,7 +1215,7 @@ int ast_app_group_list_unlock(void); ...@@ -1215,7 +1215,7 @@ int ast_app_group_list_unlock(void);
ast_app_separate_args() will perform that function before parsing ast_app_separate_args() will perform that function before parsing
the arguments. the arguments.
*/ */
#define AST_DECLARE_APP_ARGS(name, arglist) AST_DEFINE_APP_ARGS_TYPE(, arglist) name = { 0, } #define AST_DECLARE_APP_ARGS(name, arglist) AST_DEFINE_APP_ARGS_TYPE(argtype_##name, arglist) name = { 0, }
/*! /*!
\brief Define a structure type to hold an application's arguments. \brief Define a structure type to hold an application's arguments.
...@@ -1233,10 +1233,13 @@ int ast_app_group_list_unlock(void); ...@@ -1233,10 +1233,13 @@ int ast_app_group_list_unlock(void);
*/ */
#define AST_DEFINE_APP_ARGS_TYPE(type, arglist) \ #define AST_DEFINE_APP_ARGS_TYPE(type, arglist) \
struct __subtype_##type { arglist }; \
struct type { \ struct type { \
unsigned int argc; \ unsigned int argc; \
char *argv[0]; \ union { \
arglist; \ char *argv[sizeof(struct __subtype_##type) / sizeof(char*)]; \
struct { arglist }; \
}; \
} }
/*! /*!
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment