[SSSD] Fix warning may be used uninitialized
Lukas Slebodnik
lslebodn at redhat.com
Tue Nov 10 08:13:26 UTC 2015
ehlo,
and the last one patch to fix warnings on el6
LS
-------------- next part --------------
>From 84e149ddba1cebfbc37bf7b6d3769f9851bce446 Mon Sep 17 00:00:00 2001
From: Lukas Slebodnik <lslebodn at redhat.com>
Date: Tue, 10 Nov 2015 07:42:59 +0000
Subject: [PATCH 2/2] 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
---
src/providers/dp_ptask.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/providers/dp_ptask.c b/src/providers/dp_ptask.c
index 0f28dee1ed8e6683dbdb82d9274d18a10108cbd6..51800ab57b5649380c0603f1d602dfa81d1f5919 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) {
--
2.5.0
More information about the sssd-devel
mailing list