Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)
Дата
Msg-id CAEudQAqyoTZC670xWi6w-Oe2_Bk1bfu2JzXz6xRfiOUzm7xbyQ@mail.gmail.com
обсуждение исходный текст
Ответы Re: Signed vs Unsigned (take 2) (src/backend/storage/ipc/procarray.c)  (Andres Freund <andres@anarazel.de>)
Список pgsql-hackers
Hi,

With the recent changes at procarray.c, I take a look in.
msvc compiler, has some warnings about signed vs unsigned.

So.

1. Size_t is weird, because all types are int.
2. Wouldn't it be better to initialize static variables?
3. There are some shadowing parameters.
4. Possible loop beyond numProcs?

- for (size_t pgxactoff = 0; pgxactoff < numProcs; pgxactoff++)
+ for (int pgxactoff = 0; pgxactoff < numProcs; pgxactoff++)

I think no functional behavior changed.
Patch attached.

best regards,
Ranier Vilela
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: David Rowley
Дата:
Сообщение: Re: Use pg_nextpower2_* in a few more places
Следующее
От: Zhihong Yu
Дата:
Сообщение: Re: Use pg_nextpower2_* in a few more places