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

fix: rename variable to avoid clash with optarg #734

Merged
merged 1 commit into from
May 24, 2022

Conversation

PeteAudinate
Copy link
Contributor

https://linux.die.net/man/3/optarg

I realise it's unusual to include both CLI11 and getopt.h, but it can happen in large diverse codebases.

@henryiii
Copy link
Collaborator

henryiii commented May 24, 2022

I think the new name is fine, but a local optarg shouldn't conflict with the extern? Generally only macros (well, one being a macro) collide.

@PeteAudinate
Copy link
Contributor Author

Thanks for the quick reply.

You're right, it's not really a conflict but MSVC complains:
include\CLI\App.hpp(2847,1): warning C4459: declaration of 'optarg' hides global declaration

@henryiii henryiii merged commit c692be4 into CLIUtils:main May 24, 2022
@github-actions github-actions bot added needs changelog Hasn't been added to the changelog yet needs README Needs to be mentioned in the README labels May 24, 2022
@PeteAudinate PeteAudinate deleted the optarg_rename branch May 24, 2022 20:10
@henryiii henryiii removed the needs README Needs to be mentioned in the README label Sep 14, 2022
@henryiii henryiii removed the needs changelog Hasn't been added to the changelog yet label Oct 28, 2022
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