Fix warnings
The MR turns on more pedantic compiler warnings and addresses those which then arise. The majority of warnings were of the following types:
-
Unused parameters: These occur most often when the specialised implementation of a virtual function does not use all of the parameters provided by the interface. There are several approaches to address this, including:
- removing the parameter identifier in the function prototype,
- commenting-out the parameter identifier to retain the meaning, and
- declaring a dummy use of the parameter to suppress the warning.
The latter was chosen, specifically implemented using
boost::ignore_unused()
, as this sometimes occurs when a parameter is used only in debug mode, which precluded the other options. -
Variable may be used uninitialised: Appropriate default values were given.
-
Use of constants in conditionals: This mostly appeared due to assertions of the form
ASSERTL0(false, "msg");
. These were replaced withNEKERROR(ErrorUtil::efatal, "msg")
to avoid the conditional expression.