warning: comparison of integer expressions of different signedness related to simd.h

From: Pavel Stehule <pavel(dot)stehule(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: warning: comparison of integer expressions of different signedness related to simd.h
Date: 2022-09-03 05:30:03
Message-ID: CAFj8pRAagKQHfw71aQbL8PbL0S_360M61V0_vPqJXbpUFvqnRA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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++)
| ^
/usr/local/pgsql/master/include/server/port/simd.h: In function
‘vector8_has_le’:
/usr/local/pgsql/master/include/server/port/simd.h:219:27: warning:
comparison of integer expressions of different signedness: ‘int’ and ‘long
unsigned int’ [-Wsign-compare]
219 | for (int i = 0; i < sizeof(Vector8); i++)
| ^

[pavel(at)localhost plpgsql_check]$ uname -a
Linux localhost.localdomain 5.18.19-200.fc36.x86_64 #1 SMP PREEMPT_DYNAMIC
Sun Aug 21 15:52:59 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
[pavel(at)localhost plpgsql_check]$ gcc --version
gcc (GCC) 12.2.1 20220819 (Red Hat 12.2.1-1)
Copyright (C) 2022 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Regards

Pavel

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ibrar Ahmed 2022-09-03 05:36:37 Re: pgbench: using prepared BEGIN statement in a pipeline could cause an error
Previous Message Julien Rouhaud 2022-09-03 05:21:51 Re: win_flex.exe (and likely win_bison.exe) isn't concurrency safe