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

Avoid shadowed declaration errors with old gcc #880

Merged
merged 1 commit into from Mar 21, 2018
Merged

Conversation

@mwtoews
Copy link
Member

@mwtoews mwtoews commented Mar 21, 2018

On an old CentOS with gcc 4.4.7, building with CMake has errors compiling a few files due to the -Wshadow flag. (The build with autotools does not complain since it doesn't enable this flag, but that's possibly a different issue with whatever AX_CFLAGS_WARN_ALL(C_WFLAGS) is doing).

I suspect -Wshadow is more strict with older gcc releases, which is why this not the normal behaviour.

The modifications rename some function variable names, so that they are different than other function names used globally (e.g. log) or elsewhere (e.g. geodetic). If other variable names are preferred, I can swap these.

@kbevers
Copy link
Member

@kbevers kbevers commented Mar 21, 2018

Seems good to me. Thanks for fixing this, I would never have stumbled on this.

@kbevers kbevers added this to the 5.0.1 milestone Mar 21, 2018
@kbevers kbevers merged commit 88be270 into OSGeo:master Mar 21, 2018
3 checks passed
3 checks passed
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
coverage/coveralls Coverage remained the same at 75.765%
Details
@kbevers
Copy link
Member

@kbevers kbevers commented Mar 21, 2018

Cherry-picked into 5.0 branch

@mwtoews mwtoews deleted the mwtoews:rename-var branch Oct 2, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants