regulators: Fix possible uninitialized variable
The latest version of tools used during CI are emitting a new warning in
the phosphor-regulators source code. The warning states that a variable
value might not be getting defined before being used.
This is not an actual bug; the variable value will always be defined.
However, modify the code so that CI will pass.
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.com>
Change-Id: I090b50c3565ffbb57bfeab02fbcfd98d86aa527c
diff --git a/phosphor-regulators/src/phase_fault.hpp b/phosphor-regulators/src/phase_fault.hpp
index 18597c7..8f655f0 100644
--- a/phosphor-regulators/src/phase_fault.hpp
+++ b/phosphor-regulators/src/phase_fault.hpp
@@ -62,7 +62,7 @@
*/
inline ErrorType toErrorType(PhaseFaultType type)
{
- ErrorType errorType;
+ ErrorType errorType{ErrorType::phaseFaultN};
switch (type)
{
case PhaseFaultType::n: