Skip to contentSkip to conversation

Fix a gcc 4.5.2 warning uninit var

PATCH In review Bertrand Aygon 2 participants 2 messages May 6, 2011

lore
Share & tools
lore
#1 lore raw
In reply to Bertrand Aygon

Hi Bertrand,

Quoted 4 lines · Bertrand Aygon
---
 src/call-forwarding.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

Patch has been applied, thanks.

Regards,
-Denis

#0 lore raw

PATCH 1/1 Fix a gcc 4.5.2 warning uninit var

---
 src/call-forwarding.c |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
src/call-forwarding.c +3 -1
index 2068d6b..73ce433 100644
@@ -36,6 +36,8 @@
 #include "common.h"
 #include "simutil.h"
 
+#define uninitialized_var(x) x = x
+
 #define CALL_FORWARDING_FLAG_CACHED 0x1
 #define CALL_FORWARDING_FLAG_CPHS_CFF 0x2
 
@@ -246,7 +248,7 @@ static gboolean is_cfu_enabled(struct ofono_call_forwarding *cf,
 static void sim_set_cf_indicator(struct ofono_call_forwarding *cf)
 {
 	gboolean cfu_voice;
-	struct ofono_call_forwarding_condition *cond;
+	struct ofono_call_forwarding_condition *uninitialized_var(cond);
 
 	cfu_voice = is_cfu_enabled(cf, &cond);
 
Signature · 13 lines
1.7.4.1

---------------------------------------------------------------------
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: "Les Montalets"- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.