From: | David Steele <david(at)pgmasters(dot)net> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Michael Paquier <michael(at)paquier(dot)xyz> |
Cc: | PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Cast to uint16 in pg_checksum_page() |
Date: | 2020-03-04 12:02:43 |
Message-ID: | 6062bfc5-f5ef-eb0d-04e3-3c07478e480a@pgmasters.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 3/4/20 1:05 AM, Tom Lane wrote:
> Michael Paquier <michael(at)paquier(dot)xyz> writes:
>> On Tue, Mar 03, 2020 at 06:37:36PM -0500, David Steele wrote:
>>> It seems like an explicit cast to uint16 would be better?
>
>> Attempting to compile the backend code with -Wconversion leads to many
>> warnings, still there has been at least one fix in the past to ease
>> the use of the headers in this case, with b5b3229 (this made the code
>> more readable). Should we really care about this case?
>
> Per the commit message for b5b3229, it might be worth getting rid of
> such messages for code that's exposed in header files, even if removing
> all of those warnings would be too much work. Perhaps David's use-case
> is an extension that's using that header?
Yes, this is being included in an external project. Previously we have
used a highly marked-up version but we are now trying to pull in the
header more or less verbatim.
Since this header is specifically designated as something external
projects may want to use I think it makes sense to fix the warning.
Regards,
--
-David
david(at)pgmasters(dot)net
From | Date | Subject | |
---|---|---|---|
Next Message | Fujii Masao | 2020-03-04 12:07:05 | Re: Identifying user-created objects |
Previous Message | Sergei Kornilov | 2020-03-04 12:00:54 | Re: replay pause vs. standby promotion |