From 911e9879cae1f8f18e73acb3c6037af651cd9db5 Mon Sep 17 00:00:00 2001 From: Lukas Slebodnik Date: Tue, 10 Nov 2015 07:42:59 +0000 Subject: DP_PTASK: Fix warning may be used uninitialized MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit It could be unitialized only in case if we add new enum be_ptask_schedule Currently, we have only BE_PTASK_SCHEDULE_FROM_NOW and BE_PTASK_SCHEDULE_FROM_LAST which are properly covered in switch case. src/providers/dp_ptask.c:200: warning: ‘tv’ may be used uninitialized in this function Reviewed-by: Pavel Březina --- src/providers/dp_ptask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/providers') diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c index 0f28dee1e..51800ab57 100644 --- a/src/providers/dp_ptask.c +++ b/src/providers/dp_ptask.c @@ -197,7 +197,7 @@ static void be_ptask_schedule(struct be_ptask *task, enum be_ptask_delay delay_type, enum be_ptask_schedule from) { - struct timeval tv; + struct timeval tv = { 0, }; time_t delay = 0; if (!task->enabled) { -- cgit