This is how LWT_ELEMID defined in liblwgeom_topo.h:
typedef int64_t LWT_INT64;
typedef LWT_INT64 LWT_ELEMID;
I include this .h file and define some argument in LWT_ELEMID type.
But it always warns me like this: /home/user/xxx.c:880:36: warning: format '%lld' expects argument of type 'long long int', but argument 3 has type 'LWT_ELEMID' {aka 'const long int'} [-Wformat=]
or like this: /home/user/xxx.c:3034:19: note: expected 'LWT_ELEMID *' {aka 'long int *'} but argument is of type 'lint64 *' {aka 'long long int *'}
my environment:
Thread model: posix
gcc version: 8.3.0 (Ubuntu 8.3.0-6ubuntu1)
Target: x86_64-linux-gnu
For strange reasons, gcc for Linux went with making
long64 bits (even thoughlong longhas been available forever), thereby breaking backwards compatibility with 32 bit systems. So you have to use%ld, or better yet, avoid this wholelongdebacle and use the portablePRIi64conversion specifier from inttypes.h.Example: