-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ADIOS2 Access Mode: Fix Dangling Ref (#1674)
* ADIOS2 Access Mode: Fix Dangling Ref Fix GCC 13.3 warning: ``` /home/runner/work/openPMD-api/openPMD-api/src/IO/ADIOS/ADIOS2IOHandler.cpp: In member function 'adios2::Mode openPMD::ADIOS2IOHandlerImpl::adios2AccessMode(const std::string&)': /home/runner/work/openPMD-api/openPMD-api/src/IO/ADIOS/ADIOS2IOHandler.cpp:1531:21: warning: possibly dangling reference to a temporary [-Wdangling-reference] 1531 | auto const &access_mode_json = m_config["engine"]["access_mode"].json(); | ^~~~~~~~~~~~~~~~ /home/runner/work/openPMD-api/openPMD-api/src/IO/ADIOS/ADIOS2IOHandler.cpp:1531:78: note: the temporary was destroyed at the end of the full expression 'openPMD::json::TracingJSON::operator[](Key&&) [with Key = const char (&)[12]]("access_mode").openPMD::json::TracingJSON::json()' 1531 | auto const &access_mode_json = m_config["engine"]["access_mode"].json(); | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ ``` * Solve gcc13 false positive at an API level Introduce an explicit API call for the pattern that gcc13 dislikes. * Non-template alternative to the previous solution * Simplify Doxygen --------- Co-authored-by: Franz Pöschel <[email protected]>
- Loading branch information
1 parent
1257ac2
commit e9d8999
Showing
4 changed files
with
38 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters