Skip to content

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines
Affected core subsystem(s)

src, crypto

Merge request reports

Loading