Various clang tidy warning fixes (#448)

* Fixed clang-tidy bugprone-reserved-identifier warnings

* Fixed clang-tidy bugprone-assert-side-effect warnings

* Fixed clang-tidy bugprone-copy-constructor-init warning

* Fixed clang-tidy readability-redundant-preprocessor warning

For error_test.c the removed code was already dead, because it was in the else of an `#if H5_USE_16_API` block.

Based on H5Location.h, I think p_get_ref_obj_type was meant to be in `#ifndef DOXYGEN_SHOULD_SKIP_THIS` and an `#endif` was missing.  Similarly, in the header, getObjTypeByIdx is only in H5_NO_DEPRECATED_SYMBOLS, not DOXYGEN_SHOULD_SKIP_THIS.

* Fixed clang-tidy readability-redundant-string-init warnings

* Fixed some clang-tidy performance-type-promotion-in-math-fn warnings

* Fixed clang-tidy performance-unnecessary-value-param warnings

* Reformat source with clang v10.0.1.

Co-authored-by: Larry Knox <lrknox@hdfgroup.org>
This commit is contained in:
Sean McBride
2021-03-10 12:41:34 -06:00
committed by GitHub
co-authored by Larry Knox
parent 7501f96ab9
commit a7a013782f
23 changed files with 119 additions and 125 deletions
+2 -2
View File
@@ -212,7 +212,7 @@ InvalidActionException::InvalidActionException() : Exception() {}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
InvalidActionException::InvalidActionException(const H5std_string func, const H5std_string message)
InvalidActionException::InvalidActionException(const H5std_string &func, const H5std_string &message)
: Exception(func, message)
{
}
@@ -237,7 +237,7 @@ TestFailedException::TestFailedException() : Exception() {}
// func - IN: Name of the function where failure should occur
// message - IN: Message
//--------------------------------------------------------------------------
TestFailedException::TestFailedException(const H5std_string func, const H5std_string message)
TestFailedException::TestFailedException(const H5std_string &func, const H5std_string &message)
: Exception(func, message)
{
}