Skip to content

Commit 73b9d05

Browse files
committed
Fix sign-compare warnings arising from port/simd.h
Noted while building an extension using -Wsign-compare. Per gripe from Pavel Stehule Discussion: https://www.postgresql.org/message-id/CAFj8pRAagKQHfw71aQbL8PbL0S_360M61V0_vPqJXbpUFvqnRA%40mail.gmail.com
1 parent e062328 commit 73b9d05

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/include/port/simd.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ vector8_has(const Vector8 v, const uint8 c)
165165
#ifdef USE_ASSERT_CHECKING
166166
bool assert_result = false;
167167

168-
for (int i = 0; i < sizeof(Vector8); i++)
168+
for (Size i = 0; i < sizeof(Vector8); i++)
169169
{
170170
if (((const uint8 *) &v)[i] == c)
171171
{
@@ -216,7 +216,7 @@ vector8_has_le(const Vector8 v, const uint8 c)
216216
#ifdef USE_ASSERT_CHECKING
217217
bool assert_result = false;
218218

219-
for (int i = 0; i < sizeof(Vector8); i++)
219+
for (Size i = 0; i < sizeof(Vector8); i++)
220220
{
221221
if (((const uint8 *) &v)[i] <= c)
222222
{
@@ -239,7 +239,7 @@ vector8_has_le(const Vector8 v, const uint8 c)
239239
else
240240
{
241241
/* one byte at a time */
242-
for (int i = 0; i < sizeof(Vector8); i++)
242+
for (Size i = 0; i < sizeof(Vector8); i++)
243243
{
244244
if (((const uint8 *) &v)[i] <= c)
245245
{

0 commit comments

Comments
 (0)