From: Jonathan Wakely Date: Tue, 16 Jun 2026 13:51:53 +0000 (+0100) Subject: libstdc++: Use const void* for parameters of some internal helpers [PR125684] X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d5cd0663e80ccdff2c82652a0aa559efc8bf3859;p=thirdparty%2Fgcc.git libstdc++: Use const void* for parameters of some internal helpers [PR125684] libstdc++-v3/ChangeLog: PR libstdc++/125684 * src/c++11/random.cc (bad_seed, which_source): Change void* parameters to const void *. --- diff --git a/libstdc++-v3/src/c++11/random.cc b/libstdc++-v3/src/c++11/random.cc index 2f37fd5b88e..5390f05a4a5 100644 --- a/libstdc++-v3/src/c++11/random.cc +++ b/libstdc++-v3/src/c++11/random.cc @@ -197,7 +197,7 @@ namespace std _GLIBCXX_VISIBILITY(default) #ifdef USE_LCG // TODO: use this to seed std::mt19937 engine too. unsigned - bad_seed(void* p) noexcept + bad_seed(const void* p) noexcept { // Poor quality seed based on hash of the current time and the address // of the object being seeded. Better than using the same default seed @@ -253,7 +253,7 @@ namespace std _GLIBCXX_VISIBILITY(default) inline Which which_source(random_device::result_type (*func [[maybe_unused]])(void*), - void* file [[maybe_unused]]) + const void* file [[maybe_unused]]) { #ifdef _GLIBCXX_USE_CRT_RAND_S if (func == &__winxp_rand_s)