Re: compiler warnings on the buildfarm

From: Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: compiler warnings on the buildfarm
Date: 2007-07-13 07:17:46
Message-ID: 4697271A.9080502@kaltenbrunner.cc
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Tom Lane wrote:
> Stefan Kaltenbrunner <stefan(at)kaltenbrunner(dot)cc> writes:
>> ok I did that for a few members (removing all the statement not reached
>> ones as well as some purely informal notices and all the flex related
>> warnings) and came up with something similiar to:
>> [snip]
>
> Yeah, this looks like a good list. I can't readily check the ones from
> "eel" as they appear to be in Windows-specific code; anyone else want to
> fix those?

and this is the initial list for contrib(excluding a lot of duplicate
warnings and stuff that is a result of invalid compiler flags which I
will mention seperatly):

animal: salamander warnings: 6
stopword.c: In function `readstoplist':
stopword.c:51: warning: subscript has type `char'

animal: dragonfly warnings: 4
pgbench.c: In function `main':
pgbench.c:1445: warning: int format, pid_t arg (arg 4)
stopword.c: In function `readstoplist':
stopword.c:51: warning: subscript has type `char'

animal: clownfish warnings: 12
"crc32.c", line 93: warning: initializer does not fit or is out of range: -1
"crc32.c", line 102: warning: initializer does not fit or is out of
range: -1
"imath.c", line 3202: warning: integer overflow detected: op "<<"
"imath.c", line 3206: warning: integer overflow detected: op "<<"
"query_cleanup.c", line 179: warning: macro redefined: V_FALSE
"crc32.c", line 95: warning: initializer does not fit or is out of range: -1
"query_support.c", line 199: warning: syntax error: empty declaration
"query_support.c", line 200: warning: syntax error: empty declaration
"query_support.c", line 201: warning: syntax error: empty declaration
"query_support.c", line 202: warning: syntax error: empty declaration
"query_support.c", line 203: warning: syntax error: empty declaration
"query_support.c", line 204: warning: syntax error: empty declaration

animal: kudu warnings: 13
"crc32.c", line 93: warning: initializer does not fit or is out of range: -1
"crc32.c", line 102: warning: initializer does not fit or is out of
range: -1
"oid2name.c", line 579: warning: Function has no return statement : main
"pg_standby.c", line 622: warning: Function has no return statement : main
"imath.c", line 3202: warning: integer overflow detected: op "<<"
"dict_thesaurus.c", line 699: warning: non-constant initializer: op "NAME"
"crc32.c", line 95: warning: initializer does not fit or is out of range: -1
"query_support.c", line 199: warning: syntax error: empty declaration
"query_support.c", line 200: warning: syntax error: empty declaration
"query_support.c", line 201: warning: syntax error: empty declaration
"query_support.c", line 202: warning: syntax error: empty declaration
"query_support.c", line 203: warning: syntax error: empty declaration
"query_support.c", line 204: warning: syntax error: empty declaration

animal: warthog warnings: 396
UX:acomp: WARNING: "btreefuncs.c", line 59: no macro replacement within
a string literal
UX:acomp: WARNING: "pgstatindex.c", line 50: no macro replacement within
a string literal
UX:acomp: WARNING: "xpath.c", line 212: argument #1 incompatible with
prototype: strlen()
UX:acomp: WARNING: "xpath.c", line 268: argument #2 incompatible with
prototype: xmlBufferWriteChar()
UX:acomp: WARNING: "xpath.c", line 607: argument #1 incompatible with
prototype: xmlStrdup()
UX:acomp: WARNING: "xpath.c", line 612: argument #1 incompatible with
prototype: strlen()
UX:acomp: WARNING: "xpath.c", line 663: assignment type mismatch
UX:acomp: WARNING: "xpath.c", line 738: assignment type mismatch
UX:acomp: WARNING: "xpath.c", line 742: argument #1 incompatible with
prototype: strstr()
UX:acomp: WARNING: "xpath.c", line 742: argument #2 incompatible with
prototype: strstr()
UX:acomp: WARNING: "xpath.c", line 742: assignment type mismatch
UX:acomp: WARNING: "xpath.c", line 896: argument #1 incompatible with
prototype: xmlStrdup()
UX:acomp: WARNING: "xpath.c", line 904: assignment type mismatch
UX:acomp: WARNING: "xslt_proc.c", line 105: argument #1 incompatible
with prototype: xsltParseStylesheetFile()

animal: emperor_moth warnings: 11
pgbench.c: In function `main':
pgbench.c:1445: warning: int format, pid_t arg (arg 4)
query_cleanup.c:179:1: warning: "V_FALSE" redefined
In file included from /usr/include/sys/stream.h:22,
from /usr/include/netinet/in.h:66,
from /usr/include/netdb.h:98,
from ../../src/include/port.h:17,
from ../../src/include/c.h:839,
from ../../src/include/postgres.h:48,
from query_cleanup.c:6:
/usr/include/sys/vnode.h:505:1: warning: this is the location of the
previous definition

animal: cuckoo warnings: 9
y.tab.c: In function 'yy_reduce_print':
y.tab.c:764: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type
y.tab.c: In function 'yydestruct':
y.tab.c:1036: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type
y.tab.c: In function 'cube_yyparse':
y.tab.c:1277: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type
y.tab.c:1303: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type
y.tab.c:1470: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type
y.tab.c:1624: warning: passing argument 3 of 'yy_symbol_print' from
incompatible pointer type

animal: dugong warnings: 21
btreefuncs.c(218): warning #186: pointless comparison of unsigned
integer with zero
{ if ( (blkno)<0 && RelationGetNumberOfBlocks((rel))<=(blkno) )
elog_start("btreefuncs.c", 218, __func__), elog_finish(20
, "Block number out of range."); };
^
btreefuncs.c(341): warning #186: pointless comparison of unsigned
integer with zero
{ if ( (blkno)<0 &&
RelationGetNumberOfBlocks((uargs->rel))<=(blkno) )
elog_start("btreefuncs.c", 341, __func__),
elog_finish(20, "Block number out of range."); };
^
../../src/include/storage/s_lock.h(246): warning #167: argument of type
"volatile slock_t={unsigned int} *" is incompatible with
parameter of type "void *"
ret = _InterlockedExchange(lock,1);
^
pg_buffercache_pages.c(116): warning #188: enumerated type mixed with
another type
LWLockAcquire(FirstBufMappingLock + i, LW_SHARED);
^
pg_buffercache_pages.c(150): warning #188: enumerated type mixed with
another type
LWLockRelease(FirstBufMappingLock + i);
^
mbuf.c(45): warning #108: implicitly-signed bit field of length 1
int no_write:1;
^
mbuf.c(46): warning #108: implicitly-signed bit field of length 1
int own_data:1;
^

animal: grebe warnings: 3
pg_buffercache_pages.c: In function 'pg_buffercache_pages':
pg_buffercache_pages.c:125: warning: implicit declaration of function
'_check_lock'
pg_buffercache_pages.c:145: warning: implicit declaration of function
'_clear_lock'

which is probably the same problem as already discussed

animal: mongoose warnings: 46
btreefuncs.c(218): warning #186: pointless comparison of unsigned
integer with zero
CHECK_RELATION_BLOCK_RANGE(rel, blkno);
^
btreefuncs.c(341): warning #186: pointless comparison of unsigned
integer with zero
CHECK_RELATION_BLOCK_RANGE(uargs->rel, blkno);
^
pg_buffercache_pages.c(116): warning #188: enumerated type mixed with
another type
LWLockAcquire(FirstBufMappingLock + i, LW_SHARED);
^
pg_buffercache_pages.c(150): warning #188: enumerated type mixed with
another type
LWLockRelease(FirstBufMappingLock + i);
^
crypt-des.c(257) : (col. 2) remark: LOOP WAS AUTO-PARALLELIZED.
mbuf.c(45): warning #108: implicitly-signed bit field of length 1
int no_write:1;
^
mbuf.c(46): warning #108: implicitly-signed bit field of length 1
int own_data:1;
^
xpath.c(212): warning #167: argument of type "xmlChar={unsigned char} *"
is incompatible with parameter of type "const char *"
ressize = strlen(tt);
^
xpath.c(268): warning #167: argument of type "xmlChar={unsigned char} *"
is incompatible with parameter of type "const char *"
xmlBufferWriteChar(buf, plainsep);
^
xpath.c(612): warning #167: argument of type "xmlChar={unsigned char} *"
is incompatible with parameter of type "const char *"
ressize = strlen(xpresstr);
^
xpath.c(738): warning #556: a value of type "char *" cannot be assigned
to an entity of type "xmlChar={unsigned char} *"
pos = xpathset;
^
xpath.c(742): warning #167: argument of type "xmlChar={unsigned char} *"
is incompatible with parameter of type "const char *"
pos = strstr(pos, pathsep);
^
xpath.c(742): warning #167: argument of type "xmlChar={unsigned char} *"
is incompatible with parameter of type "const char *"
pos = strstr(pos, pathsep);
^
xpath.c(742): warning #556: a value of type "char *" cannot be assigned
to an entity of type "xmlChar={unsigned char} *"
pos = strstr(pos, pathsep);
^
xpath.c(904): warning #556: a value of type "xmlChar={unsigned char} *"
cannot be assigned to an entity of type "char *"
values[j + 1] = resstr;
^
xslt_proc.c(105): warning #167: argument of type "char *" is
incompatible with parameter of type "const xmlChar={unsigned char} *"
stylesheet = xsltParseStylesheetFile(GET_STR(ssheet));
^

Stefan

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message ITAGAKI Takahiro 2007-07-13 08:08:24 Re: pgstat_drop_relation bugfix
Previous Message Stefan Kaltenbrunner 2007-07-13 07:05:57 Re: compiler warnings on the buildfarm