From ffcd0e5e108f326be503a26f29f080e702dbf6b4 Mon Sep 17 00:00:00 2001 From: Dan Carpenter Date: Wed, 6 May 2009 21:47:19 +0300 Subject: [PATCH] Make the validation test harder. The test passes either way, but d is supposed to be initialized here. Signed-off-by: Dan Carpenter --- validation/sm_switch.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/validation/sm_switch.c b/validation/sm_switch.c index f0efdbce..96fcb44f 100644 --- a/validation/sm_switch.c +++ b/validation/sm_switch.c @@ -15,6 +15,7 @@ void func (void) a = 0; b = 0; c = 0; + d = 0; switch(x) { case 1: @@ -50,7 +51,7 @@ void func (void) * check-command: smatch sm_switch.c * * check-output-start -sm_switch.c +37 func(24) error: dereferencing undefined: 'a' -sm_switch.c +38 func(25) error: dereferencing undefined: 'b' +sm_switch.c +38 func(25) error: dereferencing undefined: 'a' +sm_switch.c +39 func(26) error: dereferencing undefined: 'b' * check-output-end */ -- 2.11.4.GIT