2019-09-01 François Dumont <fdumont@gcc.gnu.org>
authorFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 1 Sep 2019 20:11:42 +0000 (20:11 +0000)
committerFrançois Dumont <fdumont@gcc.gnu.org>
Sun, 1 Sep 2019 20:11:42 +0000 (20:11 +0000)
* testsuite_files/util/testsuite_performance.h
(resource_counter::start): Ignore unused malloc(0) result.

From-SVN: r275284

libstdc++-v3/ChangeLog
libstdc++-v3/testsuite/util/testsuite_performance.h

index 9156e3b..a3d3884 100644 (file)
@@ -1,3 +1,8 @@
+2019-09-01  François Dumont  <fdumont@gcc.gnu.org>
+
+       * testsuite_files/util/testsuite_performance.h
+       (resource_counter::start): Ignore unused malloc(0) result.
+
 2019-09-01  Gerald Pfeifer  <gerald@pfeifer.com>
 
        * doc/xml/manual/policy_data_structures_biblio.xml (COM: Component
index fd16391..086dcc7 100644 (file)
@@ -167,7 +167,7 @@ namespace __gnu_test
     {
       if (getrusage(who, &rusage_begin) != 0 )
        memset(&rusage_begin, 0, sizeof(rusage_begin));
-      malloc(0); // Needed for some implementations.
+      void* p __attribute__((unused)) = malloc(0); // Needed for some implementations.
       allocation_begin = mallinfo();
     }