Обсуждение: Fix C4819 warning in MSVC

Поиск
Список
Период
Сортировка

Fix C4819 warning in MSVC

От
Daniel Gustafsson
Дата:
Reading 1051867.1635720347@sss.pgh.pa.us I noticed that hamerkop raise a C4819
warning on brin_bloom.c, which is defined as:

   "The file contains a character that cannot be represented in the current
    code page (number).  Save the file in Unicode format to prevent data loss."

The warning message is mostly gibberish but AFAICT the issue is that the
headercomment includes a citation to the paper used for the hashing scheme, in
which a footnote character has been copied from the paper (without the footnote
copied).  Since the footnote is irrelevant for our documentation, I propose to
remove this offending character to remove warnings from the build.

--
Daniel Gustafsson        https://vmware.com/


Вложения

Re: Fix C4819 warning in MSVC

От
Tom Lane
Дата:
Daniel Gustafsson <daniel@yesql.se> writes:
> Reading 1051867.1635720347@sss.pgh.pa.us I noticed that hamerkop raise a C4819
> warning on brin_bloom.c, which is defined as:
>    "The file contains a character that cannot be represented in the current
>     code page (number).  Save the file in Unicode format to prevent data loss."
> The warning message is mostly gibberish but AFAICT the issue is that the
> headercomment includes a citation to the paper used for the hashing scheme, in
> which a footnote character has been copied from the paper (without the footnote
> copied).  Since the footnote is irrelevant for our documentation, I propose to
> remove this offending character to remove warnings from the build.

+1, but there are also C4819 warnings in fe_utils/print.c.  Can we get
rid of that too?  That one's a bit more integral to the code, since
(I think) it's complaining about the comments in the unicode_style table.
But maybe we could replace those with Unicode codes + symbol names?

            regards, tom lane



Re: Fix C4819 warning in MSVC

От
Daniel Gustafsson
Дата:
> On 1 Nov 2021, at 14:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> Reading 1051867.1635720347@sss.pgh.pa.us I noticed that hamerkop raise a C4819
>> warning on brin_bloom.c, which is defined as:
>>   "The file contains a character that cannot be represented in the current
>>    code page (number).  Save the file in Unicode format to prevent data loss."
>> The warning message is mostly gibberish but AFAICT the issue is that the
>> headercomment includes a citation to the paper used for the hashing scheme, in
>> which a footnote character has been copied from the paper (without the footnote
>> copied).  Since the footnote is irrelevant for our documentation, I propose to
>> remove this offending character to remove warnings from the build.
>
> +1, but there are also C4819 warnings in fe_utils/print.c.  Can we get
> rid of that too?  That one's a bit more integral to the code, since
> (I think) it's complaining about the comments in the unicode_style table.
> But maybe we could replace those with Unicode codes + symbol names?

Aha, I missed that one when skimming the (quite chatty) log.  The attached
addresses that file as well, replacing the comments with codepoints and names.
It does make the section of the code more verbose, but also more readable IMO.

--
Daniel Gustafsson        https://vmware.com/


Вложения

Re: Fix C4819 warning in MSVC

От
Tom Lane
Дата:
Daniel Gustafsson <daniel@yesql.se> writes:
> On 1 Nov 2021, at 14:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> +1, but there are also C4819 warnings in fe_utils/print.c.  Can we get
>> rid of that too?  That one's a bit more integral to the code, since
>> (I think) it's complaining about the comments in the unicode_style table.
>> But maybe we could replace those with Unicode codes + symbol names?

> Aha, I missed that one when skimming the (quite chatty) log.  The attached
> addresses that file as well, replacing the comments with codepoints and names.
> It does make the section of the code more verbose, but also more readable IMO.

Generally +1, but I think you'll need to add some dashes to keep pgindent
from re-flowing those comment blocks (which would be a big hit to the
readability).

            regards, tom lane



Re: Fix C4819 warning in MSVC

От
Daniel Gustafsson
Дата:
> On 1 Nov 2021, at 17:12, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> Daniel Gustafsson <daniel@yesql.se> writes:
>> On 1 Nov 2021, at 14:56, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>> +1, but there are also C4819 warnings in fe_utils/print.c.  Can we get
>>> rid of that too?  That one's a bit more integral to the code, since
>>> (I think) it's complaining about the comments in the unicode_style table.
>>> But maybe we could replace those with Unicode codes + symbol names?
>
>> Aha, I missed that one when skimming the (quite chatty) log.  The attached
>> addresses that file as well, replacing the comments with codepoints and names.
>> It does make the section of the code more verbose, but also more readable IMO.
>
> Generally +1, but I think you'll need to add some dashes to keep pgindent
> from re-flowing those comment blocks (which would be a big hit to the
> readability).

Agreed. Done with reflow-guards for pgindent.

--
Daniel Gustafsson        https://vmware.com/