Skip to content

tool_operate: Fix warning potentially uninitialized local variable 'pc' used - #14389

Closed
talregev wants to merge 2 commits into
curl:masterfrom
talregev:TalR/init_pc_vars
Closed

talregev wants to merge 2 commits into
curl:masterfrom
talregev:TalR/init_pc_vars

Conversation

@talregev

@talregev talregev commented Aug 4, 2024

Copy link
Copy Markdown
Contributor

From changes here:
#13988

Fix warning:
c:\projects\curl\src\tool_operhlp.c(215): error C2220: warning treated as error - no 'object' file generated [C:\projects\curl_bld\src\curl.vcxproj]
c:\projects\curl\src\tool_operhlp.c(215): warning C4701: potentially uninitialized local variable 'pc' used [C:\projects\curl_bld\src\curl.vcxproj]
https://ci.appveyor.com/project/curlorg/curl/builds/50343057/job/ljcb0k5njpuh7w2v

@bagder

bagder commented Aug 4, 2024

Copy link
Copy Markdown
Member

A false positive. But while there, can't you move the declaration into the smallest possible scope?

@talregev

talregev commented Aug 4, 2024

Copy link
Copy Markdown
Contributor Author

Done.

@talregev
talregev force-pushed the TalR/init_pc_vars branch from b94f758 to 72e8d7d Compare August 4, 2024 22:35
@bagder bagder closed this in 781c14c Aug 5, 2024
@bagder

bagder commented Aug 5, 2024

Copy link
Copy Markdown
Member

Thanks!

@talregev
talregev deleted the TalR/init_pc_vars branch August 5, 2024 06:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Development

Successfully merging this pull request may close these issues.

3 participants