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 Clang warnings about wrong format specifiers #486

Closed
wants to merge 1 commit into from
Closed

fix Clang warnings about wrong format specifiers #486

wants to merge 1 commit into from

Conversation

DerDakon
Copy link
Contributor

Use the proper format macros from inttypes.h instead.

Fixes these warnings:

/Users/travis/build/DerDakon/osm2pgsql/node-ram-cache.cpp:372:91: warning: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
    fprintf( stderr, "Node-cache: cache=%ldMB, maxblocks=%d*%zd, allocation method=%i\n", (cacheSize >> 20), maxBlocks, PER_BLOCK*sizeof(ramNode), allocStrategy );
                                        ~~~                                               ^~~~~~~~~~~~~~~~~
                                        %lld
/Users/travis/build/DerDakon/osm2pgsql/node-ram-cache.cpp:379:24: warning: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
           usedBlocks, sizeSparseTuples,
                       ^~~~~~~~~~~~~~~~

Use the proper format macros from inttypes.h instead.

Fixes these warnings:

/Users/travis/build/DerDakon/osm2pgsql/node-ram-cache.cpp:372:91: warning: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
    fprintf( stderr, "Node-cache: cache=%ldMB, maxblocks=%d*%zd, allocation method=%i\n", (cacheSize >> 20), maxBlocks, PER_BLOCK*sizeof(ramNode), allocStrategy );
                                        ~~~                                               ^~~~~~~~~~~~~~~~~
                                        %lld
/Users/travis/build/DerDakon/osm2pgsql/node-ram-cache.cpp:379:24: warning: format specifies type 'long' but the argument has type 'int64_t' (aka 'long long') [-Wformat]
           usedBlocks, sizeSparseTuples,
                       ^~~~~~~~~~~~~~~~
@pnorman
Copy link
Collaborator

pnorman commented Oct 30, 2015

#483 seems a more complete version of this

@DerDakon DerDakon closed this Oct 30, 2015
@DerDakon DerDakon deleted the int64-warnings branch October 30, 2015 10:47
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.

None yet

2 participants