]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libstdc++: Silence a warning in a test for span.
authorLuc Grosheintz <luc.grosheintz@gmail.com>
Tue, 8 Jul 2025 09:49:20 +0000 (11:49 +0200)
committerTomasz Kamiński <tkaminsk@redhat.com>
Tue, 8 Jul 2025 13:52:59 +0000 (15:52 +0200)
In a test of span, there's an unused variable myspan. This
commit silences the warning.

libstdc++-v3/ChangeLog:

* testsuite/23_containers/span/contiguous_range_neg.cc: Silence
warning about unused variable myspan.

Reviewed-by: Jonathan Wakely <jwakely@redhat.com>
Reviewed-by: Tomasz Kamiński <tkaminsk@redhat.com>
Signed-off-by: Luc Grosheintz <luc.grosheintz@gmail.com>
libstdc++-v3/testsuite/23_containers/span/contiguous_range_neg.cc

index c9e9112ed6dca65be10acebb866d7423c579fde9..890fdf8aea08310833ffcc8d6e2465ef406c3109 100644 (file)
@@ -25,6 +25,7 @@ main()
 {
   std::deque<int> d{};
   std::span<int, std::dynamic_extent> myspan(d); // { dg-error "no match" }
+  (void) myspan;
 }
 
 // { dg-prune-output "data" }