Fixes
echo.c:24: warning: missing braces around initializer
echo.c:24: warning: (near initialization for 'command_table[0]')
echo.c:30: warning: return type defaults to 'int'
echo.c:38: warning: return type defaults to 'int'
echo.c: In function '_fini':
echo.c:38: warning: control reaches end of non-void function
echo.c: In function '_init':
echo.c:32: warning: control reaches end of non-void function
Signed-off-by: Bernhard Walle <bwalle(a)suse.de>
---
extensions/echo.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
--- a/extensions/echo.c
+++ b/extensions/echo.c
@@ -21,21 +21,22 @@ void cmd_echo(); /* Declare the comm
char *help_echo[];
static struct command_table_entry command_table[] = {
- "echo", cmd_echo, help_echo, 0, /* One or more commands, */
- NULL, /* terminated by NULL, */
+ { "echo", cmd_echo, help_echo, 0 }, /* One or more commands, */
+ { NULL } /* terminated by NULL, */
};
-_init() /* Register the command set. */
+int _init() /* Register the command set. */
{
register_extension(command_table);
+ return 1;
}
/*
* The _fini() function is called if the shared object is unloaded.
* If desired, perform any cleanups here.
*/
-_fini() { }
+void _fini() { }
/*