Fix clang-tidy errors
Created by: armandas
We are using clang-tidy for static analysis and we get the following error
error: The left expression of the compound assignment is an uninitialized value. The computed value will also be garbage [clang-analyzer-core.uninitialized.Assign,-warnings-as-errors]
_flags &= KEY_IS_OWNED;
^
in this function:
void setType(uint8_t t) {
_flags &= KEY_IS_OWNED;
_flags |= t;
}
This could be resolved by adding the SYSTEM
keyword to target_include_directories, but I'm aware that GCC prior to version 9 wraps all system headers in extern "C"
, breaking the C++ libraries.
Maybe we could add an option to specify if the SYSTEM
keyword should be added? Any other ideas?