Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warning In fstack.c: next_time variable didn’t be initilaized at read_user_stack function calling #21

Closed
wangyongchoi opened this issue Oct 14, 2016 · 2 comments

Comments

@wangyongchoi
Copy link
Contributor

In fstack.c file, uint64_t next_time; variable didn't be initialized.
I think, if(next_i < 0 || tmp->time < next_time) is short-circuit evaluation.
So, when this loop isn't first loop, this variable is substituted in this way.
next_time = tmp->time;

However, if next_time variable didn't be initialized in first loop, this Warining message is displayed.

So I hope to initialize this variable.
As initial value doesn't care, Can I this variable initilize 0 or UINT64_MAX ?

@namhyung
Copy link
Owner

Thanks for your report! It'd be great if you could show your compiler version and flags to trigger this warning. Actually I tried to add some flags to the compiler but failed to trigger the warning - but found some warnings on the litraceevent. :) You can run make V=1 to see the actual command line.

Anyway, I'd rather init it to 0 as the value is not meaningul as you said. I'm looking forward to your contribution. Please read doc/contributing.md before sending the PR. Thanks!

@wangyongchoi
Copy link
Contributor Author

Thank you for your response and your kind words.
I compiled using gcc version 4.5.2.
gcc-v
And when I ran make V=1, I saw this warning message.
warning1

I'll send PR after reading doc/contributing.md
Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants