Re: Support custom socket directory in pg_upgrade - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Support custom socket directory in pg_upgrade
Date
Msg-id 24815.1543174602@sss.pgh.pa.us
Whole thread Raw
In response to Re: Support custom socket directory in pg_upgrade  (Daniel Gustafsson <daniel@yesql.se>)
List pgsql-hackers
Daniel Gustafsson <daniel@yesql.se> writes:
> [ pg_upgrade_sockdir-v3.patch ]

BTW, I notice that cfbot doesn't like this now that Thomas is running it
with -Werror:

option.c: In function ‘parseCommandLine’:
option.c:265:8: error: ignoring return value of ‘getcwd’, declared with attribute warn_unused_result
[-Werror=unused-result]
  getcwd(default_sockdir, MAXPGPATH);
        ^
cc1: all warnings being treated as errors

Failing to check a syscall's result isn't per project style even if
the tools would let you get away with it.  Other places in that same
file do

        if (!getcwd(cwd, MAXPGPATH))
            pg_fatal("could not determine current directory\n");

            regards, tom lane


pgsql-hackers by date:

Previous
From: Laurenz Albe
Date:
Subject: Re: Updated backup APIs for non-exclusive backups
Next
From: Stephen Frost
Date:
Subject: Re: Updated backup APIs for non-exclusive backups