Add `set print repeats' tests for C/C++ arrays
[binutils-gdb.git] / gdb / complaints.c
index 525a3a7eacf4bd1cb020863664f573cdbf4b9d0c..2c2d90a39d2fd0762a58ccd54209bfe5eb0df439 100644 (file)
@@ -1,6 +1,6 @@
 /* Support for complaint handling during symbol reading in GDB.
 
-   Copyright (C) 1990-2021 Free Software Foundation, Inc.
+   Copyright (C) 1990-2022 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -91,7 +91,7 @@ test_complaints ()
   do                                                                   \
     {                                                                  \
       std::string output;                                              \
-      output = execute_fn_to_string ([]() { complaint (STR); }, false);        \
+      execute_fn_to_string (output, []() { complaint (STR); }, false); \
       std::string expected                                             \
        = _("During symbol reading: ") + std::string (STR "\n");        \
       SELF_CHECK (output == expected);                                 \
@@ -102,7 +102,7 @@ test_complaints ()
   do                                                                   \
     {                                                                  \
       std::string output;                                              \
-      output = execute_fn_to_string ([]() { complaint (STR); }, false);        \
+      execute_fn_to_string (output, []() { complaint (STR); }, false); \
       SELF_CHECK (output.empty ());                                    \
       SELF_CHECK (counters[STR] == CNT);                               \
     } while (0)