> I'll see what gcc complier options I should use to detect the use of declared 
> variables that are not initialized


The flag you are looking for is -Wall. Please fix all the warnings that it may 
raise.

Generally speaking, it is also much easier to ensure your variables are 
initialized if you restrict them to the smallest scope possible. That is, 
declare the variable immediately before you use it. If you only use it within a 
loop,  then only declare it inside that loop. If you only use it in an if 
branch, then only declare it inside that branch.

Best regards,

Jacob Faibussowitsch
(Jacob Fai - booss - oh - vitch)

> On May 10, 2023, at 12:38, Tu, Jiannan <[email protected]> wrote:
> 
> I'll see what gcc complier options I should use to detect the use of declared 
> variables that are not initialized

Reply via email to