twitter_fdw
twitter_fdw copied to clipboard
Compilation failed in OSX with gcc 5.3.0
make gives the following error on OSX. I'm running gcc version 5.3.0, and use the PostgreSQL App version.
Any idea what's wrong?
gcc -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -Wno-unused-command-line-argument -mmacosx-version-min=10.7 -I. -I./ -I/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server -I/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/internal -I/Applications/Postgres.app/Contents/Versions/9.6/include/libxml2 -I/Applications/Postgres.app/Contents/Versions/9.6/include -c -o twitter_fdw.o twitter_fdw.c
twitter_fdw.c: In function 'twitter_fdw_handler':
twitter_fdw.c:180:29: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]
fdwroutine->GetForeignPlan = twitterGetPlan;
^
twitter_fdw.c:182:7: warning: extra tokens at end of #endif directive [-Wendif-labels]
#endif;
^
twitter_fdw.c: In function 'twitterGetPaths':
twitter_fdw.c:416:50: error: incompatible type for argument 3 of 'create_foreignscan_path'
(Path *)create_foreignscan_path(root, baserel, baserel->rows,
^
In file included from twitter_fdw.c:15:0:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/optimizer/pathnode.h:90:21: note: expected 'PathTarget * {aka struct PathTarget *}' but argument is of type 'double'
extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
^
In file included from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/tupdesc.h:19:0,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/utils/relcache.h:17,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/genam.h:21,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/amapi.h:15,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/reloptions.h:22,
from twitter_fdw.c:3:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/nodes/pg_list.h:69:18: error: incompatible type for argument 6 of 'create_foreignscan_path'
#define NIL ((List *) NULL)
^
twitter_fdw.c:417:15: note: in expansion of macro 'NIL'
10, 1000, NIL, NULL, NIL));
^
In file included from twitter_fdw.c:15:0:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/optimizer/pathnode.h:90:21: note: expected 'Cost {aka double}' but argument is of type 'List * {aka struct List *}'
extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
^
In file included from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/tupdesc.h:19:0,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/utils/relcache.h:17,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/genam.h:21,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/amapi.h:15,
from /Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/access/reloptions.h:22,
from twitter_fdw.c:3:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/nodes/pg_list.h:69:18: warning: passing argument 8 of 'create_foreignscan_path' from incompatible pointer type [-Wincompatible-pointer-types]
#define NIL ((List *) NULL)
^
twitter_fdw.c:417:26: note: in expansion of macro 'NIL'
10, 1000, NIL, NULL, NIL));
^
In file included from twitter_fdw.c:15:0:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/optimizer/pathnode.h:90:21: note: expected 'Relids {aka struct Bitmapset *}' but argument is of type 'List * {aka struct List *}'
extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
^
twitter_fdw.c:416:11: error: too few arguments to function 'create_foreignscan_path'
(Path *)create_foreignscan_path(root, baserel, baserel->rows,
^
In file included from twitter_fdw.c:15:0:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/optimizer/pathnode.h:90:21: note: declared here
extern ForeignPath *create_foreignscan_path(PlannerInfo *root, RelOptInfo *rel,
^
twitter_fdw.c: In function 'twitterGetPlan':
twitter_fdw.c:433:9: error: too few arguments to function 'make_foreignscan'
return make_foreignscan(tlist, keep_clauses, baserel->relid, NIL, baserel->fdw_private);
^
In file included from twitter_fdw.c:16:0:
/Applications/Postgres.app/Contents/Versions/9.6/include/postgresql/server/optimizer/planmain.h:51:21: note: declared here
extern ForeignScan *make_foreignscan(List *qptlist, List *qpqual,
^
twitter_fdw.c: In function 'twitterBegin':
twitter_fdw.c:482:9: warning: variable 'ret' set but not used [-Wunused-but-set-variable]
int ret;
^
twitter_fdw.c: In function 'twitterGetPlan':
twitter_fdw.c:434:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
twitter_fdw.c: At top level:
cc1: warning: unrecognized command line option '-Wno-unused-command-line-argument'
make: *** [twitter_fdw.o] Error 1