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

Add prototype for ps2link_response_getstat, fix compile warning #9

Merged
merged 1 commit into from
Jan 23, 2021
Merged

Conversation

mlaux
Copy link
Contributor

@mlaux mlaux commented Jan 22, 2021

Fixes these diagnostics when compiling with clang 12:

src/ps2link.c:632:12: error: implicit declaration of function 'ps2link_response_getstat' is invalid in C99 [-Werror,-Wimplicit-function-declaration]

src/ps2link.c:595:9: warning: variable 'mode' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
src/ps2link.c:632:42: note: uninitialized use occurs here
src/ps2link.c:595:5: note: remove the 'if' if its condition is always true
src/ps2link.c:587:22: note: initialize the variable 'mode' to silence this warning

…mode` used uninitialized if `if` condition is false
@rickgaiser
Copy link
Member

Why did you add the ps2link_response_getstat prototype without using it anywhere?

The other changes look good to me, but I think the prototype should be removed or implemented.

@mlaux
Copy link
Contributor Author

mlaux commented Jan 23, 2021

ps2link_response_getstat is implemented in ps2link.c and called on line 633, the prototype was just missing.

@rickgaiser
Copy link
Member

You're right, I searched for it locally and didn't find any references. But the function was added recently and I didn't have it. So all good. Merging. Thanks!

@rickgaiser rickgaiser merged commit 8236fba into ps2dev:master Jan 23, 2021
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

Successfully merging this pull request may close these issues.

2 participants