Обсуждение: Warnings in CVS build

Поиск
Список
Период
Сортировка

Warnings in CVS build

От
Philip Warner
Дата:
Some warnings in current CVS build in BSD4.3:

xact.c:590: warning: implicit declaration of function `select'
dynloader.c:85: warning: unused variable `buf'
/usr/include/grp.h:58: warning: parameter names (without types) in function
declaration
pgc.c:1244: warning: label `find_rule' defined but not used
pgc.c:3091: warning: `yy_flex_realloc' defined but not used
odbcapi.c:140: warning: no previous prototype for `SQLDataSources'
pg_restore.c:166: warning: implicit declaration of function `getopt'
pl_scan.c:1004: warning: label `find_rule' defined but not used
pl_scan.c:2295: warning: `yy_flex_realloc' defined but not used

Also some odd tsort messages. eg.

"/usr/local/pgsql-7.2dev/etc"'  -c -o pqsignal.o pqsignal.c
ar cr libpq.a `lorder fe-auth.o fe-connect.o fe-exec.o fe-misc.o fe-print.o
fe-lobj.o pqexpbuffer.o dllist.o md5.o pqsignal.o | tsor
t`
tsort: cycle in data
tsort: fe-connect.o
tsort: fe-exec.o
tsort: cycle in data
tsort: fe-auth.o
tsort: fe-connect.o


----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: Warnings in CVS build

От
Tom Lane
Дата:
Philip Warner <pjw@rhyme.com.au> writes:
> Some warnings in current CVS build in BSD4.3:

> xact.c:590: warning: implicit declaration of function `select'

Where is select() declared in your system headers?  Evidently we're
missing a #include, but I dunno which.

> dynloader.c:85: warning: unused variable `buf'

Assuming that this is freebsd, I've suppressed that warning.

> /usr/include/grp.h:58: warning: parameter names (without types) in function
> declaration

This one probably ought to be directed to the BSD maintainers.

> pgc.c:1244: warning: label `find_rule' defined but not used
> pgc.c:3091: warning: `yy_flex_realloc' defined but not used
> pl_scan.c:1004: warning: label `find_rule' defined but not used
> pl_scan.c:2295: warning: `yy_flex_realloc' defined but not used

As Thomas pointed out, we can't do much about these without control
of the flex sources.  They've irritated me for a long time, since
they're the only build warnings I get.  It's interesting though that
our other flex files don't provoke these warnings.  Perhaps the
problem only occurs if the flex source file uses yylineno?

> odbcapi.c:140: warning: no previous prototype for `SQLDataSources'

I think Hiroshi fixed this already.

> pg_restore.c:166: warning: implicit declaration of function `getopt'

This one's yours to fix ...

> Also some odd tsort messages. eg.

These are just tsort being noisy.  I'm not sure why we bother with
tsorting library member files any more anyway --- do any supported
platforms actually need it?
        regards, tom lane


Re: Warnings in CVS build

От
Philip Warner
Дата:
At 00:52 1/11/01 -0500, Tom Lane wrote:
>
>> xact.c:590: warning: implicit declaration of function `select'
>
>Where is select() declared in your system headers?  Evidently we're
>missing a #include, but I dunno which.
>


unistd.h:

int        select __P((int, fd_set *, fd_set *, fd_set *, struct timeval *));

(it is FreeBSD).



----------------------------------------------------------------
Philip Warner                    |     __---_____
Albatross Consulting Pty. Ltd.   |----/       -  \
(A.B.N. 75 008 659 498)          |          /(@)   ______---_
Tel: (+61) 0500 83 82 81         |                 _________  \
Fax: (+61) 0500 83 82 82         |                 ___________ |
Http://www.rhyme.com.au          |                /           \|                                |    --________--
PGP key available upon request,  |  /
and from pgp5.ai.mit.edu:11371   |/


Re: Warnings in CVS build

От
Tom Lane
Дата:
Philip Warner <pjw@rhyme.com.au> writes:
>> Where is select() declared in your system headers?  Evidently we're
>> missing a #include, but I dunno which.

> unistd.h:

Okay, added.  That select() has been in xact.c since before 7.1, so
I'm surprised this wasn't reported before ...
        regards, tom lane