Bug 1646176 - Fix clang-11 uninitialized warnings in test-prettyprinters.cpp r=jimb
authorDavid Major <dmajor@mozilla.com>
Fri, 19 Jun 2020 00:56:03 +0000
changeset 536479 62c8ae7d2c524a0e2caf2559355f54530d6e78ce
parent 536478 ac468fb1ea9db6653e39c5fcfbaebea8ac07673b
child 536480 123a43a72b54622399609d612b2bb30dc286930d
push id37526
push userdluca@mozilla.com
push dateSun, 21 Jun 2020 09:38:46 +0000
treeherdermozilla-central@6803dda74d33 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjimb
bugs1646176
milestone79.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1646176 - Fix clang-11 uninitialized warnings in test-prettyprinters.cpp r=jimb Starting in clang-11 we'll get: `error: variable 'i' is uninitialized when passed as a const reference argument here [-Werror,-Wuninitialized-const-reference]` Differential Revision: https://phabricator.services.mozilla.com/D79906
js/src/gdb/tests/test-prettyprinters.cpp
--- a/js/src/gdb/tests/test-prettyprinters.cpp
+++ b/js/src/gdb/tests/test-prettyprinters.cpp
@@ -9,19 +9,19 @@ typedef C C_;
 typedef D D_;
 class E : C, D {};
 typedef E E_;
 class F : C_, D_ {};
 class G {};
 class H : F, G {};
 
 FRAGMENT(prettyprinters, implemented_types) {
-  int i;
-  A a;
-  B b;
+  int i = 0;
+  A a = 0;
+  B b = 0;
   C c;
   C_ c_;
   E e;
   E_ e_;
   F f;
   H h;
 
   breakpoint();