This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[patch c++]: Fix possible uninitialized variable


Hi,

ChangeLog

2010-07-14  Kai Tietz

          * method.c (synthesized_method_walk): Initialize
          check_vdtor by false.

Tested for i686-pc-linux-gnu, i686-pc-mingw32, and x86_64-pc-mingw32.
Ok for apply?

Regards,
Kai

-- 
|? (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination

Index: method.c
===================================================================
--- method.c    (revision 162168)
+++ method.c    (working copy)
@@ -941,7 +941,7 @@
                         bool diag)
 {
   tree binfo, base_binfo, field, scope, fnname, rval, argtype;
-  bool move_p, copy_arg_p, assign_p, expected_trivial, check_vdtor;
+  bool move_p, copy_arg_p, assign_p, expected_trivial, check_vdtor = false;
   VEC(tree,gc) *vbases;
   int i, quals, flags;
   tsubst_flags_t complain;


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]