From f242aa7fd133537bef4e0506cb31cea3ac1ca43d Mon Sep 17 00:00:00 2001 From: Stefan Becker Date: Wed, 14 Mar 2012 22:57:13 +0200 Subject: [PATCH] build: fix maybe unitialized errors Latest F17 GCC 4.7.0 package has -Wmaybe-initialized enabled. --- configure.ac | 1 + src/core/sipe-cal.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/configure.ac b/configure.ac index cffe335e..1f0e80b3 100644 --- a/configure.ac +++ b/configure.ac @@ -98,6 +98,7 @@ AS_IF([test "x$enable_quality_check" = xyes], "-Wdeclaration-after-statement" \ "-Wdeprecated-declarations" \ "-Winit-self" \ + "-Wmaybe-uninitialized" \ "-Wmissing-declarations" \ "-Wmissing-prototypes" \ "-Wnested-externs" \ diff --git a/src/core/sipe-cal.c b/src/core/sipe-cal.c index 93bf58de..b9d15dc7 100644 --- a/src/core/sipe-cal.c +++ b/src/core/sipe-cal.c @@ -3,7 +3,7 @@ * * pidgin-sipe * - * Copyright (C) 2010-11 SIPE Project + * Copyright (C) 2010-12 SIPE Project * Copyright (C) 2009 pier11 * * @@ -674,7 +674,7 @@ sipe_cal_get_status(struct sipe_buddy *buddy, const char* free_busy; int ret = SIPE_CAL_NO_DATA; time_t state_since; - int index; + int index = -1; if (!buddy || !buddy->cal_start_time || !buddy->cal_granularity) { SIPE_DEBUG_INFO("sipe_cal_get_status: no calendar data1 for %s, exiting", -- 2.11.4.GIT