Am Sonntag, 4. November 2018 10:07:19 CET schrieb Stephan Witt 
<st.w...@gmx.net>:
> Hi Kornel,
> 
> Apple clang has spotted a problem probably introduced in change 74c849d651.
> 
> ====
> src/lyxfind.cpp:1672:10: warning: variable 'nextKeyIdx' is used uninitialized 
> whenever switch case is taken
>       [-Wsometimes-uninitialized]
>     case KeyInfo::isMain: {
>          ^~~~~~~~~~~~~~~
> src/lyxfind.cpp:1695:10: note: uninitialized use occurs here
>   return(nextKeyIdx);
>          ^~~~~~~~~~
> src/lyxfind.cpp:1592:17: note: initialize the variable 'nextKeyIdx' to 
> silence this warning
>   int nextKeyIdx;
>                 ^
>                  = 0
> ====
> 
> Can you verify what should be done here, please?
> 
> Stephan
> 

Actually nothing wrong. In case 'isMain' the variable is not set, but in that 
case the calling routine
discards the returned value anyway. In all other cases the variable is set.
Initializing to anything is OK.
Will change.

        Kornel

Attachment: signature.asc
Description: This is a digitally signed message part.

Reply via email to