Avoid suspects casts VARHDRSZ (c.h)

Поиск
Список
Период
Сортировка
От Ranier Vilela
Тема Avoid suspects casts VARHDRSZ (c.h)
Дата
Msg-id CAEudQArKoEwofiQJJA2AEv--YZixqX60xJB0=Cn0x8O8Uz4oRw@mail.gmail.com
обсуждение исходный текст
Ответы Re: Avoid suspects casts VARHDRSZ (c.h)
Список pgsql-hackers
Hi,

In all the static analysis tools I’ve used, there are literally *hundreds* of alerts about a one suspect cast:

64 bits sizet_t -> 32 bits int -> 64 bits size_t
-#define VARHDRSZ ((int32) sizeof(int32))
+#define VARHDRSZ (sizeof(int32))

Is there any special reason for not simplifying this and avoiding these alerts?
Passed 100% with vcregress check and in use in local tests.

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

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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: Logical replication CPU-bound with TRUNCATE/DROP/CREATE many tables
Следующее
От: David Rowley
Дата:
Сообщение: Re: Get rid of runtime handling of AlternativeSubPlan?