Hi Bjarni,

Bjarni Ingi Gislason <bjarn...@simnet.is> writes:

>   CXX      src/preproc/preconv/preconv-preconv.o
> ../src/preproc/preconv/preconv.cpp: In function 'const char* get_BOM(FILE*, 
> string&, string&)':
> ../src/preproc/preconv/preconv.cpp:820:17: warning: comparison of integer 
> expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned 
> int'} [-Wsign-compare]
>   820 |   for (i = 0; i < countof(BOM_table); i++) {
> ../src/preproc/preconv/preconv.cpp:826:9: warning: comparison of integer 
> expressions of different signedness: 'int' and 'size_t' {aka 'long unsigned 
> int'} [-Wsign-compare]
>   826 |   if (i < countof(BOM_table)) {
>
> N.B.
>   The new patch did not apply with the trailing spaces in it
> (contained in some files to be patched).

That is because previously it was compared against this:

    const int BOM_table_len = sizeof (BOM_table) / sizeof(BOM_table[0]);

You can cast the countof to (int), or I guess use the int() constructor
in C++ (I think, have not touched C++ in a long time).

But Gnulib just ignores these warnings, since most of the time they are
harmless. I'd be suprised if groff enabled it by default.

Collin

Reply via email to