On 4/8/19 12:34 AM, mingli...@windriver.com wrote:
> From: Mingli Yu <mingli...@windriver.com>
> 
> Initialize struct stat to fix the below
> build failure when -Og included in compiler flag.
> | 
> ./../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:
>  In function 'elf_is_symlink':
> | 
> ../../../../../../../../../work-shared/gcc-8.3.0-r0/gcc-8.3.0/libsanitizer/libbacktrace/../../libbacktrace/elf.c:772:21:
>  error: 'st.st_mode' may be used uninitialized in this function 
> [-Werror=maybe-uninitialized]
>    return S_ISLNK (st.st_mode);
> 
> Signed-off-by: Mingli Yu <mingli...@windriver.com>
> ---
>  libbacktrace/elf.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
This is a false positive in -Wuninitialized that can be worked around by
compiling with -O2.  Please do that rather than compiling with -Og.

jeff

Reply via email to