Thread: compile-time-error

compile-time-error

From
Martin Willemoes Hansen
Date:
Your name               :       Martin Willemoes Hansen
Your email address      :    mwh@sysrq.dk


System Configuration
---------------------
  Architecture (example: Intel Pentium)         : AMD K6-2 300 MHz

  Operating System (example: Linux 2.0.26 ELF)  :Linux 2.4.3, glibc 2.2.2.

  PostgreSQL version (example: PostgreSQL-7.1):   PostgreSQL-7.1

  Compiler used (example:  gcc 2.8.0)           :Linux 2.4.3, glibc 2.2.2,
gcc-2.95.3


Please enter a FULL description of your problem:
------------------------------------------------
I get a compile-time-error. It goes likes this:

gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
-I../../../src/interfaces/libpq -I../../../src/include   -c -o
tab-complete.o tab-complete.c
tab-complete.c: In function     nitialize_readline':
tab-complete.c:103: warning: assignment from incompatible pointer type
tab-complete.c: In function ^Psql_completion':
tab-complete.c:292: warning: implicit declaration of function
^Completion_matches'
tab-complete.c:292: warning: assignment makes pointer from integer without
a
cast
tab-complete.c:296: warning: assignment makes pointer from integer without
a
cast

....

tab-complete.c:718: warning: assignment makes pointer from integer without
a
cast
tab-complete.c:725: warning: assignment makes pointer from integer without
a
cast
tab-complete.c:734: ^Filename_completion_function' undeclared (first use in
this function)
tab-complete.c:734: (Each undeclared identifier is reported only once
tab-complete.c:734: for each function it appears in.)
tab-complete.c:734: warning: assignment makes pointer from integer without
a
cast
tab-complete.c:749: warning: assignment makes pointer from integer without
a
cast
tab-complete.c:763: warning: assignment makes pointer from integer without
a
cast
make[3]: *** [tab-complete.o] Error 1
make[3]: Leaving directory
/mnt/gnu/source/console/databases/postgresql/postgresql-7.1/src/bin/psql'
make[2]: *** [all] Error 2
make[2]: Leaving directory
/mnt/gnu/source/console/databases/postgresql/postgresql-7.1/src/bin'
make[1]: *** [all] Error 2
make[1]: Leaving directory
/mnt/gnu/source/console/databases/postgresql/postgresql-7.1/src'
make: *** [all] Error 2

Please describe a way to repeat the problem.   Please try to provide a
concise reproducible example, if at all possible:
----------------------------------------------------------------------
configure --prefix=$PREFIX --enable-syslog \
--mandir=$PREFIX/share/man && \
make

Martin Willemoes Hansen

--------------------------------------------------------
E-Mail    mwh@sysrq.dk    Website    mwh.sysrq.dk
IRC     MWH, openprojects
--------------------------------------------------------

Re: compile-time-error

From
Peter Eisentraut
Date:
Martin Willemoes Hansen writes:

> gcc -O2 -Wall -Wmissing-prototypes -Wmissing-declarations
> -I../../../src/interfaces/libpq -I../../../src/include   -c -o
> tab-complete.o tab-complete.c
> tab-complete.c: In function     nitialize_readline':
> tab-complete.c:103: warning: assignment from incompatible pointer type
> tab-complete.c: In function ^Psql_completion':
> tab-complete.c:292: warning: implicit declaration of function
> ^Completion_matches'

A patch is available at http://www.postgresql.org/~petere/readline42.html.

--
Peter Eisentraut   peter_e@gmx.net   http://funkturm.homeip.net/~peter