Warnings building 8.5alpha3 on Solaris 10
Warnings building 8.5alpha3 on Solaris 10
От:
Isaac Morland <ijmorlan@uwaterloo.ca>
Дата:
I get the following warnings building 8.5alpha3 on Solaris 10. I do not get these warnings building 8.4 exactly the same way. standby.c:239: warning: int format, pid_t arg (arg 3) standby.c:247: warning: int format, pid_t arg (arg 5) descriptor.c:23: warning: missing braces around initializer descriptor.c:23: warning: (near initialization for `descriptor_once.__pthread_once_pad') memory.c:73: warning: missing braces around initializer memory.c:73: warning: (near initialization for `auto_mem_once.__pthread_once_pad') connect.c:16: warning: missing braces around initializer connect.c:16: warning: (near initialization for `actual_connection_key_once.__pthread_once_pad') misc.c:61: warning: missing braces around initializer misc.c:61: warning: (near initialization for `sqlca_key_once.__pthread_once_pad') (I'm leaving out the known "unused variable `yyg'" issue in scan.c) Also, I get the following on both 8.4 and 8.5 (same builds as above): auth.c:82: warning: initialization from incompatible pointer type (except in 8.4 it's at line 80) I get none of these warnings (except the "yyg" one) building 8.5alpha3 on my Mac (OS X 10.5.8). The closest thing I can find to a mention of this issue is: http://archives.postgresql.org/pgsql-hackers/2010-01/msg01935.php Isaac Morland CSCF Web Guru DC 2554C, x36650 WWW Software Specialist
Re: Warnings building 8.5alpha3 on Solaris 10
От:
Tom Lane <tgl@sss.pgh.pa.us>
Дата:
Isaac Morland writes: > I get the following warnings building 8.5alpha3 on Solaris 10. > I do not get these warnings building 8.4 exactly the same way. > standby.c:239: warning: int format, pid_t arg (arg 3) > standby.c:247: warning: int format, pid_t arg (arg 5) That looks like a real problem, but it seems to be cleaned up already in HEAD. > descriptor.c:23: warning: missing braces around initializer > descriptor.c:23: warning: (near initialization for `descriptor_once.__pthread_once_pad') > memory.c:73: warning: missing braces around initializer > memory.c:73: warning: (near initialization for `auto_mem_once.__pthread_once_pad') > connect.c:16: warning: missing braces around initializer > connect.c:16: warning: (near initialization for `actual_connection_key_once.__pthread_once_pad') > misc.c:61: warning: missing braces around initializer > misc.c:61: warning: (near initialization for `sqlca_key_once.__pthread_once_pad') These all seem to relate to uses of PTHREAD_ONCE_INIT, which is a system-provided macro --- so I think you need to complain to Sun that their headers provide warning-inducing declarations. It should be just cosmetic as far as functionality goes, though. > auth.c:82: warning: initialization from incompatible pointer type > (except in 8.4 it's at line 80) This one probably is because of a discrepancy in "const" decorations of parameters for the PAM callback proc. Again, it's cosmetic, and seems more likely to indicate obsolete Solaris headers than anything we should change on our end. regards, tom lane