From 0e68eb8d265481716171c73adbda2dd248710571 Mon Sep 17 00:00:00 2001 From: Gergely Nagy Date: Thu, 19 Dec 2013 11:48:13 +0100 Subject: [PATCH] pdbtool: If a test message has no program attribute, warn when verbose When encountering a test message that has no program attribute, warn about it when verbose mode is on. The rationale for only doing it in verbose mode is that there are valid reasons for having no program attribute for a test (to temporarily disable it, for example), and we don't want to needlessly spew a lot of warnings at the user. Reported-by: Fabien Wernli Signed-off-by: Gergely Nagy --- modules/dbparser/pdbtool/pdbtool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/dbparser/pdbtool/pdbtool.c b/modules/dbparser/pdbtool/pdbtool.c index e4ed75fd3a..9d19dcc09d 100644 --- a/modules/dbparser/pdbtool/pdbtool.c +++ b/modules/dbparser/pdbtool/pdbtool.c @@ -743,6 +743,12 @@ pdbtool_test(int argc, char *argv[]) { example = examples->data; + if (!example->program && verbose_flag) + { + printf ("Warnning, message has no 'program' attribute: message='%s'\n", + example->message); + } + if (example->message && example->program) { PDBInput input;