From a95438527f2db7a1535ce679edde004b982dba60 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Fri, 1 Aug 2014 12:07:32 +0200 Subject: Remove some warnings, correct minor error message text --- src/ParserCmdline.cpp | 17 +++++++++++++++-- src/dabInput.h | 2 ++ 2 files changed, 17 insertions(+), 2 deletions(-) diff --git a/src/ParserCmdline.cpp b/src/ParserCmdline.cpp index 9d46bf4..98140de 100644 --- a/src/ParserCmdline.cpp +++ b/src/ParserCmdline.cpp @@ -109,7 +109,20 @@ bool parse_cmdline(char **argv, vector::iterator service = ensemble->services.end(); dabProtection* protection = NULL; - dabInputOperations operations; + // Yes, this is ugly, but it suppresses warnings + dabInputOperations operations = { + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL, + NULL + }; // Default ensemble parameters: ensemble->lto = 0; @@ -566,7 +579,7 @@ bool parse_cmdline(char **argv, int level; if (optarg == NULL) { etiLog.log(error, - "Missing parameter for option -P\n"); + "Missing parameter for option -p\n"); printUsage(progName); goto EXIT; } diff --git a/src/dabInput.h b/src/dabInput.h index fb64459..f1b4348 100644 --- a/src/dabInput.h +++ b/src/dabInput.h @@ -31,6 +31,8 @@ extern Logger etiLog; +// TODO replace usage of dabInputOperations by a +// class hierarchy struct dabInputOperations { int (*init)(void** args); int (*open)(void* args, const char* name); -- cgit v1.2.3