From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> |
---|---|
To: | Aleksander Alekseev <a(dot)alekseev(at)postgrespro(dot)ru>, David Steele <david(at)pgmasters(dot)net> |
Cc: | PostgreSQL Developers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: [PATCH] Suppress Clang 3.9 warnings |
Date: | 2017-03-17 22:02:40 |
Message-ID: | 74b8619a-6077-83b6-efce-7b4fdc111bb8@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3/13/17 11:35, Aleksander Alekseev wrote:
> Here is a new patch. I tried to make as little changes as possible. This
> is no doubt not the most beautiful patch on Earth but it removes all
> warnings. I anyone could suggest an approach that would be significantly
> better please don't hesitate to share your ideas.
I'm also seeing the -Wconstant-conversion warnings with clang-4.0. The
warnings about strlcpy don't appear here. That might be something
specific to the operating system.
To address the -Wconstant-conversion warnings, I suggest changing the
variables to unsigned char * as appropriate.
However, this would require a large number of changes to all call sites
of XLogRegisterData(), because they all have a cast like this:
XLogRegisterData((char *) &xlrec, SizeOfHashMovePageContents);
Perhaps the first argument could be changed to void *.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2017-03-17 22:05:51 | Re: [PATCH] Move all am-related reloption code into src/backend/access/[am-name] and get rid of relopt_kind for custom AM |
Previous Message | Masahiko Sawada | 2017-03-17 22:01:31 | Re: Two phase commit in ECPG |