Skip to content

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.

2 participants