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 536496 62c8ae7d2c524a0e2caf2559355f54530d6e78ce
parent 536495 ac468fb1ea9db6653e39c5fcfbaebea8ac07673b
child 536497 123a43a72b54622399609d612b2bb30dc286930d
push id119493
push userdmajor@mozilla.com
push dateSat, 20 Jun 2020 21:01:38 +0000
treeherderautoland@62c8ae7d2c52 [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();