Simple -Wshadow=local fixes
[deliverable/binutils-gdb.git] / gdb / unittests / array-view-selftests.c
index eba792f587ed6bf1e6a44d7aee463facda7fbc12..3116ab27216510baf5fda47b0e95e9798a2903c5 100644 (file)
@@ -444,14 +444,14 @@ run_tests ()
 
   /* op[] */
   {
-    std::vector<gdb_byte> vec = {0x11, 0x22};
-    gdb::array_view<gdb_byte> view = vec;
-    gdb::array_view<const gdb_byte> cview = vec;
+    std::vector<gdb_byte> vec2 = {0x11, 0x22};
+    gdb::array_view<gdb_byte> view = vec2;
+    gdb::array_view<const gdb_byte> cview = vec2;
 
     /* Check that op[] on a non-const view of non-const T returns a
        mutable reference.  */
     view[0] = 0x33;
-    SELF_CHECK (vec[0] == 0x33);
+    SELF_CHECK (vec2[0] == 0x33);
 
     /* OTOH, check that assigning through op[] on a view of const T
        wouldn't compile.  */
This page took 0.023592 seconds and 4 git commands to generate.