diff mbox

[committed] Fix uninitialized variables causing breakage with -Werror.

Message ID 1379054342-14878-1-git-send-email-adam@jessamine.co.uk
State New
Headers show

Commit Message

Adam Butcher Sept. 13, 2013, 6:38 a.m. UTC
From: abutcher <abutcher@138bc75d-0d04-0410-961f-82ee72b054a4>

	* lambda.c (maybe_add_lambda_conv_op): Initialize direct_argvec and call
	to nullptr to avoid breakage with -Werror.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@202554 138bc75d-0d04-0410-961f-82ee72b054a4
---
 gcc/cp/ChangeLog | 5 +++++
 gcc/cp/lambda.c  | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/gcc/cp/ChangeLog b/gcc/cp/ChangeLog
index 68c8ea4..80e0d96 100644
--- a/gcc/cp/ChangeLog
+++ b/gcc/cp/ChangeLog
@@ -1,3 +1,8 @@ 
+2013-09-13  Adam Butcher  <adam@jessamine.co.uk>
+
+	* lambda.c (maybe_add_lambda_conv_op): Initialize direct_argvec and call
+	to nullptr to avoid breakage with -Werror.
+
 2013-09-12  Brooks Moses  <bmoses@google.com>
 
 	PR driver/42955
diff --git a/gcc/cp/lambda.c b/gcc/cp/lambda.c
index 2d20333..0da22fd 100644
--- a/gcc/cp/lambda.c
+++ b/gcc/cp/lambda.c
@@ -792,8 +792,8 @@  maybe_add_lambda_conv_op (tree type)
      particular, parameter pack expansions are marked PACK_EXPANSION_LOCAL_P in
      the body CALL, but not in DECLTYPE_CALL.  */
 
-  vec<tree, va_gc> *direct_argvec;
-  tree decltype_call = 0, call;
+  vec<tree, va_gc> *direct_argvec = 0;
+  tree decltype_call = 0, call = 0;
   tree fn_result = TREE_TYPE (TREE_TYPE (callop));
 
   if (generic_lambda_p)