CodeQL queries 1.23
A local non-static variable of a non-class type has an undefined value
before it is initialized. For example, it is incorrect to rely on
an uninitialized integer to have the value
Review the code and consider whether the variable should have an initializer or whether some path through the program lacks an assignment to the variable.
absWrong does not initialize the variable
in the case where
i = 0. Functions
absCorrect2 remedy this deficiency by adding an initializer and adding
an assignment to one of the paths through the program, respectively.