pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #15280: Clang 6.0.1 compiler warning - strlcpy
3+ messages / 3 participants
[nested] [flat]

* BUG #15280: Clang 6.0.1 compiler warning - strlcpy
@ 2018-07-16 13:50 PG Bug reporting form <noreply@postgresql.org>
  2018-07-16 15:27 ` Re: BUG #15280: Clang 6.0.1 compiler warning - strlcpy Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 3+ messages in thread

From: PG Bug reporting form @ 2018-07-16 13:50 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: steven.winfield@cantabcapital.com

The following bug has been logged on the website:

Bug reference:      15280
Logged by:          Steven Winfield
Email address:      steven.winfield@cantabcapital.com
PostgreSQL version: 11beta2
Operating system:   RHEL 7.4
Description:        

Hi,

While compiling 11beta2 using clang 6.0.1 this warning crops up quite a lot
in an otherwise quiet build process - so I thought it might be of
interest:

pg_rewind.c:724:4: warning: implicitly declaring library function 'strlcpy'
with type 'unsigned long (char *, const char *, unsigned long)'
[-Wimplicit-function-declaration]
                        strlcpy(full_path, progname, sizeof(full_path));
                        ^
pg_rewind.c:724:4: note: include the header <string.h> or explicitly provide
a declaration for 'strlcpy'
1 warning generated.

In my pg_config.h I have:
#define HAVE_DECL_STRLCPY 1

...and HAVE_STRLCPY is left undefined:
/* #undef HAVE_STRLCPY */

Best wishes,
Steven.



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: BUG #15280: Clang 6.0.1 compiler warning - strlcpy
  2018-07-16 13:50 BUG #15280: Clang 6.0.1 compiler warning - strlcpy PG Bug reporting form <noreply@postgresql.org>
@ 2018-07-16 15:27 ` Tom Lane <tgl@sss.pgh.pa.us>
  2018-07-16 16:58   ` RE: BUG #15280: Clang 6.0.1 compiler warning - strlcpy Steven Winfield <Steven.Winfield@cantabcapital.com>
  0 siblings, 1 reply; 3+ messages in thread

From: Tom Lane @ 2018-07-16 15:27 UTC (permalink / raw)
  To: steven.winfield@cantabcapital.com; +Cc: pgsql-bugs@lists.postgresql.org

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> While compiling 11beta2 using clang 6.0.1 this warning crops up quite a lot
> in an otherwise quiet build process - so I thought it might be of
> interest:
> pg_rewind.c:724:4: warning: implicitly declaring library function 'strlcpy'
> with type 'unsigned long (char *, const char *, unsigned long)'
> [-Wimplicit-function-declaration]

Yeah, this is a known problem caused by autoconf doing its "is this
function declared" test in a way that clang doesn't play nice with.

There's a fix for this upstream:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=82ef7805faffa151e724aa76c245ec590d174580

and we've been patiently waiting for an autoconf release that
incorporates it ...

			regards, tom lane




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* RE: BUG #15280: Clang 6.0.1 compiler warning - strlcpy
  2018-07-16 13:50 BUG #15280: Clang 6.0.1 compiler warning - strlcpy PG Bug reporting form <noreply@postgresql.org>
  2018-07-16 15:27 ` Re: BUG #15280: Clang 6.0.1 compiler warning - strlcpy Tom Lane <tgl@sss.pgh.pa.us>
@ 2018-07-16 16:58   ` Steven Winfield <Steven.Winfield@cantabcapital.com>
  0 siblings, 0 replies; 3+ messages in thread

From: Steven Winfield @ 2018-07-16 16:58 UTC (permalink / raw)
  To: Tom Lane <tgl@sss.pgh.pa.us>; +Cc: pgsql-bugs@lists.postgresql.org <pgsql-bugs@lists.postgresql.org>

From: Tom Lane [mailto:tgl@sss.pgh.pa.us]
Sent: 16 July 2018 16:27
To: Steven Winfield
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #15280: Clang 6.0.1 compiler warning - strlcpy

=?utf-8?q?PG_Bug_reporting_form?= <noreply@postgresql.org> writes:
> While compiling 11beta2 using clang 6.0.1 this warning crops up quite a lot
> in an otherwise quiet build process - so I thought it might be of
> interest:
> pg_rewind.c:724:4: warning: implicitly declaring library function 'strlcpy'
> with type 'unsigned long (char *, const char *, unsigned long)'
> [-Wimplicit-function-declaration]

Yeah, this is a known problem caused by autoconf doing its "is this
function declared" test in a way that clang doesn't play nice with.

There's a fix for this upstream:

http://git.savannah.gnu.org/cgit/autoconf.git/commit/?id=82ef7805faffa151e724aa76c245ec590d174580<...;

and we've been patiently waiting for an autoconf release that
incorporates it ...


Thanks - I'll add my voice to the release requests.

Steve



This email is confidential. If you are not the intended recipient, please advise us immediately and delete this message. 
The registered name of Cantab- part of GAM Systematic is Cantab Capital Partners LLP. 
See - http://www.gam.com/en/Legal/Email+disclosures+EU for further information on confidentiality, the risks of non-secure electronic communication, and certain disclosures which we are required to make in accordance with applicable legislation and regulations. 
If you cannot access this link, please notify us by reply message and we will send the contents to you.

GAM Holding AG and its subsidiaries (Cantab – GAM Systematic) will collect and use information about you in the course of your interactions with us. 
Full details about the data types we collect and what we use this for and your related rights is set out in our online privacy policy at https://www.gam.com/en/legal/privacy-policy. 
Please familiarise yourself with this policy and check it from time to time for updates as it supplements this notice.

^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2018-07-16 16:58 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-07-16 13:50 BUG #15280: Clang 6.0.1 compiler warning - strlcpy PG Bug reporting form <noreply@postgresql.org>
2018-07-16 15:27 ` Tom Lane <tgl@sss.pgh.pa.us>
2018-07-16 16:58   ` Steven Winfield <Steven.Winfield@cantabcapital.com>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox