GSoC Project | Basic Support for Trace Compass

Sebastian Huber sebastian.huber at embedded-brains.de
Mon Jul 8 06:58:51 UTC 2019


On 08/07/2019 08:53, Ravindra Kumar Meena wrote:
>      > I used GCC 8.3.0.
> 
>     I see this error also with GCC 8:
> 
>     /usr/bin/gcc-8 -O2 misc/record/record-main.c -I misc/record -Wall
>     misc/record/record-main.c: In function ‘main’:
>     misc/record/record-main.c:135:30: warning: ‘input_file’ may be used
>     uninitialized in this function [-Wmaybe-uninitialized]
>          fd = ( input_file_flag ) ? open( input_file, O_RDONLY ) :
>                                     ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
>     misc/record/record-main.c:278:15: note: ‘input_file’ was declared here
>          const char *input_file;
>                      ^~~~~~~~~~
> 
> This is really very strange. GCC on my machine shows some other warnings 
> but not that one.
> 
>     Anyway, could you please fix this warning. The input_file may be in
>     fact
>     uninitialized.
> 
> Yes. I would definitely like to fix this warning but how will I test my 
> code changes if I don't see the warnings.  All the warning that you have 
> shown to me till now have one thing in common. They are all 
> uninitialized. I don't know why GCC on my machine is not able to report 
> that.

Maybe Ubuntu patched GCC to not emit such warnings.

> 
> We can do one thing. I will make changes here and I will push it on my 
> workplace. You build it and let me know if it still gives warning.
> 
>      >
>      > I have attached the configure and build process in txt file.
>     Please find
>      > them both below.
> 
>     What is the output for the record-main.c if you use "./waf -v".
> 
> 
> I get this on "./waf -v"

I am not really interested in the complete log. What is the output of

./waf clean
./waf -v | grep record

?

-- 
Sebastian Huber, embedded brains GmbH

Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone   : +49 89 189 47 41-16
Fax     : +49 89 189 47 41-09
E-Mail  : sebastian.huber at embedded-brains.de
PGP     : Public key available on request.

Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.



More information about the devel mailing list