Re: warning: comparison of integer expressions of different signedness related to simd.h - Mailing list pgsql-hackers

From Pavel Stehule
Subject Re: warning: comparison of integer expressions of different signedness related to simd.h
Date
Msg-id CAFj8pRA_hEE-kZdEVoPsAv9Fbw=n+MoyiQU2ktv6C2U85j_0jA@mail.gmail.com
Whole thread Raw
In response to Re: warning: comparison of integer expressions of different signedness related to simd.h  (John Naylor <john.naylor@enterprisedb.com>)
List pgsql-hackers


so 3. 9. 2022 v 7:50 odesílatel John Naylor <john.naylor@enterprisedb.com> napsal:
On Sat, Sep 3, 2022 at 12:30 PM Pavel Stehule <pavel.stehule@gmail.com> wrote:
>
> Hi
>
> I got fresh warnings when I build an extension
>
> In file included from /usr/local/pgsql/master/include/server/mb/pg_wchar.h:22,
>                  from src/format.c:17:
> /usr/local/pgsql/master/include/server/port/simd.h: In function ‘vector8_has’:
> /usr/local/pgsql/master/include/server/port/simd.h:168:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ [-Wsign-compare]
>   168 |         for (int i = 0; i < sizeof(Vector8); i++)
>       |                           ^

"int" should probably be "Size" -- does that remove the warning?

yes, it removes warnings

Pavel

--
John Naylor
EDB: http://www.enterprisedb.com

pgsql-hackers by date:

Previous
From: John Naylor
Date:
Subject: Re: warning: comparison of integer expressions of different signedness related to simd.h
Next
From: Tom Lane
Date:
Subject: Re: warning: comparison of integer expressions of different signedness related to simd.h