On Tue, Dec 9, 2014 at 4:45 AM, Jeff Janes <jeff.ja...@gmail.com> wrote:
> In the past, building under MinGW produced so many warnings that I never
> bothered to read them.
>
> Now most of them have been removed, so the ones that are left might be worth
> reporting.
>
> Using gcc.exe (GCC) 4.6.2 on REL9_4_STABLE
> eadd80c08ddfc485db84b9af7cca54a0d50ebe6d I get:
>
> mingwcompat.c:60:1: warning: 'RegisterWaitForSingleObject' redeclared
> without dllimport attribute: previous dllimport ignored [-Wattributes]
> input.c:382:1: warning: 'saveHistory' defined but not used
> [-Wunused-function]
>
> Does anyone have opinions on how to address these?
Compiling with MinGW-32b, I am getting more of those than the ones you
mention, per se the attached. I'll try to come up with a patch to
reduce this amount on master.
-- 
Michael
configure: WARNING: *** Readline does not work on MinGW --- disabling
configure: WARNING: *** skipping thread test on Win32
dirmod.c: In function 'pgwin32_safestat':
dirmod.c:369:2: warning: implicit declaration of function 'stat' 
[-Wimplicit-function-declaration]
  r = stat(path, buf);
  ^
dirmod.c: In function 'pgwin32_safestat':
dirmod.c:369:2: warning: implicit declaration of function 'stat' 
[-Wimplicit-function-declaration]
  r = stat(path, buf);
  ^
twophase.c: In function 'ReadTwoPhaseFile':
twophase.c:1252:2: warning: passing argument 2 of '_fstat64i32' from 
incompatible pointer type [enabled by default]
  if (fstat(fd, &stat))
  ^
In file included from ../../../../src/include/port.h:283:0,
                 from ../../../../src/include/c.h:1050,
                 from ../../../../src/include/postgres.h:47,
                 from twophase.c:36:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
In file included from gram.y:14321:0:
scan.c: In function 'yy_try_NUL_trans':
scan.c:10188:23: warning: unused variable 'yyg' [-Wunused-variable]
     struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be 
unused depending upon options. */
                       ^
copy.c: In function 'BeginCopyTo':
copy.c:1710:4: warning: passing argument 2 of '_fstat64i32' from incompatible 
pointer type [enabled by default]
    fstat(fileno(cstate->copy_file), &st);
    ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres.h:47,
                 from copy.c:15:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
copy.c: In function 'BeginCopyFrom':
copy.c:2721:4: warning: passing argument 2 of '_fstat64i32' from incompatible 
pointer type [enabled by default]
    fstat(fileno(cstate->copy_file), &st);
    ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres.h:47,
                 from copy.c:15:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
md5.c:88:0: warning: "G" redefined [enabled by default]
 #define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
 ^
<command-line>:0:0: note: this is the location of the previous definition
basebackup.c: In function 'perform_base_backup':
basebackup.c:461:4: warning: passing argument 2 of '_fstat64i32' from 
incompatible pointer type [enabled by default]
    if (fstat(fileno(fp), &statbuf) != 0)
    ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres.h:47,
                 from basebackup.c:13:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
snapmgr.c: In function 'ImportSnapshot':
snapmgr.c:1142:2: warning: passing argument 2 of '_fstat64i32' from 
incompatible pointer type [enabled by default]
  if (fstat(fileno(f), &stat_buf))
  ^
In file included from ../../../../src/include/port.h:283:0,
                 from ../../../../src/include/c.h:1050,
                 from ../../../../src/include/postgres.h:47,
                 from snapmgr.c:42:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
fe-connect.c: In function 'parseServiceInfo':
fe-connect.c:3899:3: warning: implicit declaration of function 'stat' 
[-Wimplicit-function-declaration]
   if (stat(serviceFile, &stat_buf) != 0 && errno == ENOENT)
   ^
md5.c:88:0: warning: "G" redefined [enabled by default]
 #define G(x, y, z) (((x) & (z)) | ((y) & ~(z)))
 ^
<command-line>:0:0: note: this is the location of the previous definition
pg_ctl.c: In function 'readfile':
pg_ctl.c:338:2: warning: passing argument 2 of '_fstat64i32' from incompatible 
pointer type [enabled by default]
  if (fstat(fd, &statbuf) < 0)
  ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres_fe.h:25,
                 from pg_ctl.c:20:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
input.c:382:1: warning: 'saveHistory' defined but not used [-Wunused-function]
 saveHistory(char *fname, int max_lines)
 ^
copy.c: In function 'do_copy':
copy.c:345:3: warning: passing argument 2 of '_fstat64i32' from incompatible 
pointer type [enabled by default]
   if ((result = fstat(fileno(copystream), &st)) < 0)
   ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres_fe.h:25,
                 from copy.c:8:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
receivelog.c: In function 'open_walfile':
receivelog.c:97:2: warning: passing argument 2 of '_fstat64i32' from 
incompatible pointer type [enabled by default]
  if (fstat(f, &statbuf) != 0)
  ^
In file included from ../../../src/include/port.h:283:0,
                 from ../../../src/include/c.h:1050,
                 from ../../../src/include/postgres_fe.h:25,
                 from receivelog.c:15:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
fe-connect.c: In function 'parseServiceInfo':
fe-connect.c:3899:3: warning: implicit declaration of function 'stat' 
[-Wimplicit-function-declaration]
   if (stat(serviceFile, &stat_buf) != 0 && errno == ENOENT)
   ^
pg_stat_statements.c: In function 'qtext_load_file':
pg_stat_statements.c:1817:2: warning: passing argument 2 of '_fstat64i32' from 
incompatible pointer type [enabled by default]
  if (fstat(fd, &stat))
  ^
In file included from ../../src/include/port.h:283:0,
                 from ../../src/include/c.h:1050,
                 from ../../src/include/postgres.h:47,
                 from pg_stat_statements.c:58:
c:\mingw\include\sys\stat.h:200:32: note: expected 'struct _stat64i32 *' but 
argument is of type 'struct stat *'
 __CRT_MAYBE_INLINE int __cdecl _fstat64i32(int desc, struct _stat64i32 *_stat) 
{
                                ^
md5.c:43:0: warning: "G" redefined [enabled by default]
 #define G(X, Y, Z) (((X) & (Z)) | ((Y) & (~Z)))
 ^
<command-line>:0:0: note: this is the location of the previous definition
compat.c: In function 'appendStringInfo':
compat.c:85:2: warning: function might be possible candidate for 'ms_printf' 
format attribute [-Wsuggest-attribute=format]
  vprintf(fmt, args);
  ^
-- 
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers

Reply via email to