Skip to content

Comments

Fix compiler warnings, part 9#1316

Merged
nilason merged 1 commit intoOSGeo:masterfrom
nilason:fix-compiler-warnings-9
Feb 17, 2021
Merged

Fix compiler warnings, part 9#1316
nilason merged 1 commit intoOSGeo:masterfrom
nilason:fix-compiler-warnings-9

Conversation

@nilason
Copy link
Contributor

@nilason nilason commented Feb 9, 2021

Use platform independent int64 format specifier, with the PRId64 macro from <inttypes.h> available with c99.

Lifted out of PR #1256, awaiting community decision on C standard usage within the GRASS GIS project, see discussion on grass-dev mail list.

Addresses -Wformat compiler warnings.

Ninth part addressing #1247.

Addresses -Wformat compiler warnings.
Copy link
Contributor

@metzm metzm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fine with me.

I am not sure if the community understands that accepting C99 or something higher as C standard does not mean we need to change the remaining code base.

C code written for an older C standard works fine with newer C standards.

This is different with Python: if we require a certain Python version, code written for a previous Python version might no longer work with a newer Python version.

@nilason nilason marked this pull request as ready for review February 10, 2021 06:36
@nilason
Copy link
Contributor Author

nilason commented Feb 10, 2021

I am not sure if the community understands that accepting C99 or something higher as C standard does not mean we need to change the remaining code base.

C code written for an older C standard works fine with newer C standards.

This is different with Python: if we require a certain Python version, code written for a previous Python version might no longer work with a newer Python version.

Indeed.

Re: <inttypes.h>: it is included with the (only partly and still so) C99 support of Visual Studio 2013. This being the platform historically least supportive of C standards, I'm quite convinced this should be safe in 2021.

Copy link
Contributor

@metzm metzm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK, let's go for it!

@nilason nilason merged commit 5c86956 into OSGeo:master Feb 17, 2021
@nilason
Copy link
Contributor Author

nilason commented Feb 17, 2021

OK, let's go for it!

I agree, merged. On the off chance this causes trouble, it is easy to revert.

@nilason nilason deleted the fix-compiler-warnings-9 branch February 17, 2021 11:31
marisn pushed a commit to marisn/grass that referenced this pull request Mar 22, 2021
@neteler neteler added this to the 8.0.0 milestone Dec 9, 2021
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Oct 26, 2022
ninsbl pushed a commit to ninsbl/grass that referenced this pull request Feb 17, 2023
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.

3 participants