-
Notifications
You must be signed in to change notification settings - Fork 30k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
src: remove void casts for clear_error_on_return
There are a number of void casts of clear_error_on_return which is a usage of the RAII idiom. The ClearErrorOnReturn struct only has a destructor and no constructor which I believe was an issue in GCC prior to version 4.8.0, which lead to a unused variable warning. I'm wondering if these cast could be removed since GCC 4.8.5 or newer is required now. An alternative solution would be to add an empty constructor which should work allowing the compiler to detect that a variable is used only for its side-effects. Not sure if this was the sole reason for having these casts but wanted to bring it up just in case. Refs: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=10416 PR-URL: #13669 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
- Loading branch information
Showing
1 changed file
with
0 additions
and
14 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