Details
-
Bug
-
Status: Closed (View Workflow)
-
Trivial
-
Resolution: Fixed
-
None
-
None
Description
When bringing in the the mariadb-connector-cpp code as an internal dependency and building with clang 18.1.x and GCC 14, with warnings cranked up, the following warning is emitted:
/home/runner/work/server/server/build/_deps/mariadb-connector-cpp-src/src/util/ServerPrepareResult.cpp: In member function 'bool sql::mariadb::ServerPrepareResult::incrementShareCounter()': |
/home/runner/work/server/server/build/_deps/mariadb-connector-cpp-src/src/util/ServerPrepareResult.cpp:157:5: warning: '++' expression of 'volatile'-qualified type is deprecated [-Wvolatile] |
157 | shareCounter++;
|
| ^~~~~~~~~~~~
|
/home/runner/work/server/server/build/_deps/mariadb-connector-cpp-src/src/util/ServerPrepareResult.cpp: In member function 'void sql::mariadb::ServerPrepareResult::decrementShareCounter()': |
/home/runner/work/server/server/build/_deps/mariadb-connector-cpp-src/src/util/ServerPrepareResult.cpp:164:5: warning: '--' expression of 'volatile'-qualified type is deprecated [-Wvolatile] |
164 | shareCounter--;
|
| ^~~~~~~~~~~~
|
Access to shareCounter looks to be protected by locks, so it would be safe to remove this volatile qualifier.