Skip to content

Instantly share code, notes, and snippets.

@springmeyer
Created November 20, 2012 02:26
Show Gist options
  • Save springmeyer/4115540 to your computer and use it in GitHub Desktop.
Save springmeyer/4115540 to your computer and use it in GitHub Desktop.
ansi + pedantic osm2pgsql compile
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/UTF8sanitizer.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/UTF8sanitizer.o ../UTF8sanitizer.c
/Debug/obj.target/osm2pgsql/UTF8sanitizer.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/UTF8sanitizer.o ../UTF8sanitizer.c
../UTF8sanitizer.c:34:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
long long line;
^
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
long long chars1, chars2, chars3, chars4, chars5, chars6;
^
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
../UTF8sanitizer.c:35:5: warning: 'long long' is an extension when C99 mode is not enabled [-pedantic,-Wlong-long]
../UTF8sanitizer.c:103:11: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//Handle_ASCII_char();
^
8 warnings generated.
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/expire-tiles.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/expire-tiles.o ../expire-tiles.c
/Debug/obj.target/osm2pgsql/expire-tiles.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/expire-tiles.o ../expire-tiles.c
In file included from ../expire-tiles.c:16:
In file included from ../expire-tiles.h:4:
In file included from ../output.h:13:
In file included from ../middle.h:10:
../osmtypes.h:10:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// Use ./configure --enable-64bit-ids to build a version that supports 64bit IDs.
^
In file included from ../expire-tiles.c:16:
In file included from ../expire-tiles.h:4:
In file included from ../output.h:13:
../middle.h:28:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// int (*nodes_get)(struct osmNode *out, osmid_t id);
^
In file included from ../expire-tiles.c:16:
In file included from ../expire-tiles.h:4:
../output.h:64:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// void (*process)(struct middle_t *mid);
^
In file included from ../expire-tiles.c:18:
../pgsql.h:6:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//#define DEBUG_PGSQL
^
../expire-tiles.c:24:34: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
#define TILE_EXPIRY_LEEWAY 0.1 // How many tiles worth of space to leave either side of a changed feature
^
5 warnings generated.
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/binarysearcharray.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/binarysearcharray.o ../binarysearcharray.c
In file included from ../binarysearcharray.c:6:
../osmtypes.h:10:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// Use ./configure --enable-64bit-ids to build a version that supports 64bit IDs.
^
../binarysearcharray.c:16:9: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//fprintf(stderr, "testing pivot %i (%i, %i) which is %i against %i\n", pivot,a,b, array->array[pivot].key, key);
^
../binarysearcharray.c:39:9: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int idx = binary_search_lookup(array, key);
^
../binarysearcharray.c:81:13: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int idx = binary_search_lookup(array, key);
^
4 warnings generated.
clang++ '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/build_geometry.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/build_geometry.o ../build_geometry.cpp
ut/Debug/obj.target/osm2pgsql/build_geometry.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/build_geometry.o ../build_geometry.cpp
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/input.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/input.o ../input.c
/Debug/obj.target/osm2pgsql/input.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/input.o ../input.c
../input.c:25:3: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// needed by bzip2 when decompressing from multiple streams. other
^
1 warning generated.
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/output-pgsql.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/output-pgsql.o ../output-pgsql.c
/Debug/obj.target/osm2pgsql/output-pgsql.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/output-pgsql.o ../output-pgsql.c
In file included from ../output-pgsql.c:25:
../osmtypes.h:10:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// Use ./configure --enable-64bit-ids to build a version that supports 64bit IDs.
^
In file included from ../output-pgsql.c:26:
In file included from ../output.h:13:
../middle.h:28:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// int (*nodes_get)(struct osmNode *out, osmid_t id);
^
In file included from ../output-pgsql.c:26:
../output.h:64:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// void (*process)(struct middle_t *mid);
^
In file included from ../output-pgsql.c:31:
../pgsql.h:6:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//#define DEBUG_PGSQL
^
../output-pgsql.c:50:5: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//enum table_id table;
^
../output-pgsql.c:59:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_point", .type = "POINT" },
^~~~~~~~~~~~~~~~~~
../output-pgsql.c:59:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_point", .type = "POINT" },
^~~~~~~~~~~~~~~
../output-pgsql.c:60:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_line", .type = "LINESTRING"},
^~~~~~~~~~~~~~~~~
../output-pgsql.c:60:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_line", .type = "LINESTRING"},
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:61:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_polygon", .type = "GEOMETRY" }, // Actually POLGYON & MULTIPOLYGON but no way to limit to just these two
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:61:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_polygon", .type = "GEOMETRY" }, // Actually POLGYON & MULTIPOLYGON but no way to limit to just these two
^~~~~~~~~~~~~~~~~~
../output-pgsql.c:62:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_roads", .type = "LINESTRING"}
^~~~~~~~~~~~~~~~~~
../output-pgsql.c:62:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "%s_roads", .type = "LINESTRING"}
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:75:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "polygon", .flag = FLAG_POLYGON },
^~~~~~~~~~~~~~~~~
../output-pgsql.c:75:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "polygon", .flag = FLAG_POLYGON },
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:76:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "linear", .flag = FLAG_LINEAR },
^~~~~~~~~~~~~~~~
../output-pgsql.c:76:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "linear", .flag = FLAG_LINEAR },
^~~~~~~~~~~~~~~~~~~
../output-pgsql.c:77:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "nocache", .flag = FLAG_NOCACHE },
^~~~~~~~~~~~~~~~~
../output-pgsql.c:77:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "nocache", .flag = FLAG_NOCACHE },
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:78:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "delete", .flag = FLAG_DELETE },
^~~~~~~~~~~~~~~~
../output-pgsql.c:78:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "delete", .flag = FLAG_DELETE },
^~~~~~~~~~~~~~~~~~~
../output-pgsql.c:79:7: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "phstore", .flag = FLAG_PHSTORE }
^~~~~~~~~~~~~~~~~
../output-pgsql.c:79:29: warning: designated initializers are a C99 feature [-pedantic]
{ .name = "phstore", .flag = FLAG_PHSTORE }
^~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:147:10: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
char osmtype[24];
^
../output-pgsql.c:142:8: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
char buffer[1024];
^
../output-pgsql.c:524:14: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
size_t hlen=2 * (strlen(xtags->next->key) + strlen(xtags->next->value)) + 7;
^
../output-pgsql.c:501:20: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
struct keyval *xtags = tags;
^
../output-pgsql.c:587:23: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
char *shortkey = xtags->next->key + strlen(Options->hstore_columns[i_hstore_column]);
^
../output-pgsql.c:563:9: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int i_hstore_column;
^
../output-pgsql.c:916:24: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
double area = get_area(i);
^
../output-pgsql.c:1289:17: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int their_srid = atoi(PQgetvalue(res, 0, 0));
^
../output-pgsql.c:1321:17: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int i_hstore_column;
^
../output-pgsql.c:1303:22: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
enum OsmType type = (i == t_point)?OSMTYPE_NODE:OSMTYPE_WAY;
^
../output-pgsql.c:1432:9: warning: ISO C90 forbids mixing declarations and code [-pedantic,-Wdeclaration-after-statement]
int stop = PQputCopyEnd(table->sql_conn, NULL);
^
../output-pgsql.c:1837:9: warning: designated initializers are a C99 feature [-pedantic]
.start = pgsql_out_start,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1838:9: warning: designated initializers are a C99 feature [-pedantic]
.connect = pgsql_out_connect,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1839:9: warning: designated initializers are a C99 feature [-pedantic]
.stop = pgsql_out_stop,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1840:9: warning: designated initializers are a C99 feature [-pedantic]
.cleanup = pgsql_out_cleanup,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1841:9: warning: designated initializers are a C99 feature [-pedantic]
.close = pgsql_out_close,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1842:9: warning: designated initializers are a C99 feature [-pedantic]
.node_add = pgsql_add_node,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1843:9: warning: designated initializers are a C99 feature [-pedantic]
.way_add = pgsql_add_way,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1844:9: warning: designated initializers are a C99 feature [-pedantic]
.relation_add = pgsql_add_relation,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1846:9: warning: designated initializers are a C99 feature [-pedantic]
.node_modify = pgsql_modify_node,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1847:9: warning: designated initializers are a C99 feature [-pedantic]
.way_modify = pgsql_modify_way,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1848:9: warning: designated initializers are a C99 feature [-pedantic]
.relation_modify = pgsql_modify_relation,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1850:9: warning: designated initializers are a C99 feature [-pedantic]
.node_delete = pgsql_delete_node,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1851:9: warning: designated initializers are a C99 feature [-pedantic]
.way_delete = pgsql_delete_way,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../output-pgsql.c:1852:9: warning: designated initializers are a C99 feature [-pedantic]
.relation_delete = pgsql_delete_relation
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
48 warnings generated.
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/rb.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/rb.o ../rb.c
/Debug/obj.target/osm2pgsql/rb.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/rb.o ../rb.c
clang '-DDARWIN' '-D_THREAD_SAFE' '-DVERSION="0.80.0"' '-DBUILD_READER_PBF' '-DPLATFORM="mac"' '-D_LARGEFILE_SOURCE' '-D_FILE_OFFSET_BITS=64' '-DOSM2PGSQL_DATADIR="/usr/local/share/osm2pgsql"' -I../include -I/usr/local/include -I/usr/include/libxml2 -I../. -g -O0 -pedantic -Wall -ansi -MMD -MF out/Debug/.deps/out/Debug/obj.target/osm2pgsql/middle-pgsql.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/middle-pgsql.o ../middle-pgsql.c
/Debug/obj.target/osm2pgsql/middle-pgsql.o.d.raw -c -o out/Debug/obj.target/osm2pgsql/middle-pgsql.o ../middle-pgsql.c
In file included from ../middle-pgsql.c:38:
../osmtypes.h:10:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// Use ./configure --enable-64bit-ids to build a version that supports 64bit IDs.
^
In file included from ../middle-pgsql.c:39:
../middle.h:28:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// int (*nodes_get)(struct osmNode *out, osmid_t id);
^
In file included from ../middle-pgsql.c:41:
In file included from ../output-pgsql.h:9:
../output.h:64:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
// void (*process)(struct middle_t *mid);
^
In file included from ../middle-pgsql.c:44:
../pgsql.h:6:1: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//#define DEBUG_PGSQL
^
../middle-pgsql.c:60:5: warning: // comments are not allowed in this language [-pedantic,-Wcomment]
//enum table_id table;
^
../middle-pgsql.c:80:10: warning: designated initializers are a C99 feature [-pedantic]
.name = "%p_nodes",
^~~~~~~~~~~~~~~~~~
../middle-pgsql.c:81:9: warning: designated initializers are a C99 feature [-pedantic]
.start = "BEGIN;\n",
^~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:83:8: warning: designated initializers are a C99 feature [-pedantic]
....create = "CREATE %m TABLE %p_nodes (id " POSTGRES_OSMID_TYPE " PRIMARY KEY {USING INDEX TABLESPACE %i}, lat int4 not null, lon int4 not null, tags text[]) {TABLESPACE %t};\n"...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:84:7: warning: designated initializers are a C99 feature [-pedantic]
.prepare = "PREPARE insert_node (" POSTGRES_OSMID_TYPE ", int4, int4, text[]) AS INSERT INTO %p_nodes VALUES ($1,$2,$3,$4);\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:91:1: warning: designated initializers are a C99 feature [-pedantic]
.prepare_intarray = // This is to fetch lots of nodes simultaneously, in order including duplicates. The commented out version doesn't do duplicates
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:97:10: warning: designated initializers are a C99 feature [-pedantic]
.copy = "COPY %p_nodes FROM STDIN;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:98:7: warning: designated initializers are a C99 feature [-pedantic]
.analyze = "ANALYZE %p_nodes;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:99:10: warning: designated initializers are a C99 feature [-pedantic]
.stop = "COMMIT;\n"
^~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:103:10: warning: designated initializers are a C99 feature [-pedantic]
.name = "%p_ways",
^~~~~~~~~~~~~~~~~
../middle-pgsql.c:104:9: warning: designated initializers are a C99 feature [-pedantic]
.start = "BEGIN;\n",
^~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:105:8: warning: designated initializers are a C99 feature [-pedantic]
....create = "CREATE %m TABLE %p_ways (id " POSTGRES_OSMID_TYPE " PRIMARY KEY {USING INDEX TABLESPACE %i}, nodes " POSTGRES_OSMID_TYPE "[] not null, tags text[], pending boolean not null) {TABLESPACE %t};\n"...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:106:2: warning: designated initializers are a C99 feature [-pedantic]
.create_index = "CREATE INDEX %p_ways_idx ON %p_ways (id) {TABLESPACE %i} WHERE pending;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:107:1: warning: designated initializers are a C99 feature [-pedantic]
.array_indexes = "CREATE INDEX %p_ways_nodes ON %p_ways USING gin (nodes) {TABLESPACE %i};\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:108:18: warning: string literal of length 511 exceeds maximum length 509 that C90 compilers are required to support
[-pedantic,-Woverlength-strings]
.prepare = "PREPARE insert_way (" POSTGRES_OSMID_TYPE ", " POSTGRES_OSMID_TYPE "[], text[], boolean) AS INSERT INTO %p_ways VALUES ($1,$2,$3,$4);\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:108:7: warning: designated initializers are a C99 feature [-pedantic]
.prepare = "PREPARE insert_way (" POSTGRES_OSMID_TYPE ", " POSTGRES_OSMID_TYPE "[], text[], boolean) AS INSERT INTO %p_ways VALUES ($1,$2,$3,$4);\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:114:1: warning: designated initializers are a C99 feature [-pedantic]
.prepare_intarray = "PREPARE node_changed_mark(" POSTGRES_OSMID_TYPE ") AS UPDATE %p_ways SET pending = true WHERE nodes && ARRAY[$1] AND NOT pending;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:115:10: warning: designated initializers are a C99 feature [-pedantic]
.copy = "COPY %p_ways FROM STDIN;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:116:7: warning: designated initializers are a C99 feature [-pedantic]
.analyze = "ANALYZE %p_ways;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:117:10: warning: designated initializers are a C99 feature [-pedantic]
.stop = "COMMIT;\n"
^~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:121:10: warning: designated initializers are a C99 feature [-pedantic]
.name = "%p_rels",
^~~~~~~~~~~~~~~~~
../middle-pgsql.c:122:9: warning: designated initializers are a C99 feature [-pedantic]
.start = "BEGIN;\n",
^~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:123:8: warning: designated initializers are a C99 feature [-pedantic]
....create = "CREATE %m TABLE %p_rels(id " POSTGRES_OSMID_TYPE " PRIMARY KEY {USING INDEX TABLESPACE %i}, way_off int2, rel_off int2, parts " POSTGRES_OSMID_TYPE "[], members text[], tags text[], pending boolean not null) {TABLESPACE %t};\n"...
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:124:2: warning: designated initializers are a C99 feature [-pedantic]
.create_index = "CREATE INDEX %p_rels_idx ON %p_rels (id) {TABLESPACE %i} WHERE pending;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:125:1: warning: designated initializers are a C99 feature [-pedantic]
.array_indexes = "CREATE INDEX %p_rels_parts ON %p_rels USING gin (parts) {TABLESPACE %i};\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:126:7: warning: designated initializers are a C99 feature [-pedantic]
....prepare = "PREPARE insert_rel (" POSTGRES_OSMID_TYPE ", int2, int2, " POSTGRES_OSMID_TYPE "[], text[], text[]) AS INSERT INTO %p_rels VALUES ($1,$2,$3,$4,$5,$6,false);\n"
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:131:1: warning: designated initializers are a C99 feature [-pedantic]
.prepare_intarray =
^~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:135:10: warning: designated initializers are a C99 feature [-pedantic]
.copy = "COPY %p_rels FROM STDIN;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:136:7: warning: designated initializers are a C99 feature [-pedantic]
.analyze = "ANALYZE %p_rels;\n",
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:137:10: warning: designated initializers are a C99 feature [-pedantic]
.stop = "COMMIT;\n"
^~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:237:8: error: unknown type name 'inline'
static inline char *escape_tag( char *ptr, const char *in, int escape )
^
../middle-pgsql.c:237:15: error: expected identifier or '('
static inline char *escape_tag( char *ptr, const char *in, int escape )
^
../middle-pgsql.c:1568:9: warning: implicit declaration of function 'set_prefix_and_tbls' [-Wimplicit-function-declaration]
set_prefix_and_tbls(options, &(tables[i].name));
^
../middle-pgsql.c:1655:17: error: use of undeclared identifier 'build_indexes'
build_indexes = 1;
^
../middle-pgsql.c:1695:9: warning: implicit declaration of function 'pgsql_endCopy' [-Wimplicit-function-declaration]
pgsql_endCopy(&tables[i]);
^
../middle-pgsql.c:1717:13: error: use of undeclared identifier 'build_indexes'
if (build_indexes && table->array_indexes) {
^
../middle-pgsql.c:1785:9: warning: designated initializers are a C99 feature [-pedantic]
.start = pgsql_start,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1786:9: warning: designated initializers are a C99 feature [-pedantic]
.stop = pgsql_stop,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1787:9: warning: designated initializers are a C99 feature [-pedantic]
.cleanup = pgsql_cleanup,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1788:30: error: use of undeclared identifier 'pgsql_analyze'
.analyze = pgsql_analyze,
^
../middle-pgsql.c:1789:30: error: use of undeclared identifier 'pgsql_end'; did you mean 'pgsql_exec'?
.end = pgsql_end,
^~~~~~~~~
pgsql_exec
../pgsql.h:10:5: note: 'pgsql_exec' declared here
int pgsql_exec(PGconn *sql_conn, ExecStatusType expect, const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
^
../middle-pgsql.c:1789:9: warning: designated initializers are a C99 feature [-pedantic]
.end = pgsql_end,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1790:9: warning: designated initializers are a C99 feature [-pedantic]
.commit = pgsql_commit,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1792:30: error: use of undeclared identifier 'middle_nodes_set'
.nodes_set = middle_nodes_set,
^
../middle-pgsql.c:1796:30: error: use of undeclared identifier 'middle_nodes_get_list'
.nodes_get_list = middle_nodes_get_list,
^
../middle-pgsql.c:1797:28: error: use of undeclared identifier 'middle_nodes_delete'
.nodes_delete = middle_nodes_delete,
^
../middle-pgsql.c:1798:30: error: use of undeclared identifier 'pgsql_node_changed'
.node_changed = pgsql_node_changed,
^
../middle-pgsql.c:1800:30: error: use of undeclared identifier 'pgsql_ways_set'
.ways_set = pgsql_ways_set,
^
../middle-pgsql.c:1801:30: error: use of undeclared identifier 'pgsql_ways_get'
.ways_get = pgsql_ways_get,
^
../middle-pgsql.c:1802:30: error: use of undeclared identifier 'pgsql_ways_get_list'
.ways_get_list = pgsql_ways_get_list,
^
../middle-pgsql.c:1803:30: error: use of undeclared identifier 'pgsql_ways_done'; did you mean 'pgsql_stop_one'?
.ways_done = pgsql_ways_done,
^~~~~~~~~~~~~~~
pgsql_stop_one
../middle-pgsql.c:1703:14: note: 'pgsql_stop_one' declared here
static void *pgsql_stop_one(void *arg)
^
../middle-pgsql.c:1803:9: warning: designated initializers are a C99 feature [-pedantic]
.ways_done = pgsql_ways_done,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1804:30: error: use of undeclared identifier 'pgsql_ways_delete'
.ways_delete = pgsql_ways_delete,
^
../middle-pgsql.c:1805:30: error: use of undeclared identifier 'pgsql_way_changed'
.way_changed = pgsql_way_changed,
^
../middle-pgsql.c:1807:30: error: use of undeclared identifier 'pgsql_rels_set'
.relations_set = pgsql_rels_set,
^
../middle-pgsql.c:1811:30: error: use of undeclared identifier 'pgsql_rels_done'; did you mean 'pgsql_stop_one'?
.relations_done = pgsql_rels_done,
^~~~~~~~~~~~~~~
pgsql_stop_one
../middle-pgsql.c:1703:14: note: 'pgsql_stop_one' declared here
static void *pgsql_stop_one(void *arg)
^
../middle-pgsql.c:1811:9: warning: designated initializers are a C99 feature [-pedantic]
.relations_done = pgsql_rels_done,
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../middle-pgsql.c:1812:30: error: use of undeclared identifier 'pgsql_rels_delete'
.relations_delete = pgsql_rels_delete,
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
43 warnings and 20 errors generated.
make: *** [out/Debug/obj.target/osm2pgsql/middle-pgsql.o] Error 1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment