Re: [HACKERS] Fix warnings and typo in dshash

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] Fix warnings and typo in dshash
Дата
Msg-id CAA4eK1+BOp5aaW3aHEkg5Bptf8Ga_BkBnmA-=XcAXShs0yCiYQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Fix warnings and typo in dshash  (Thomas Munro <thomas.munro@enterprisedb.com>)
Ответы Re: [HACKERS] Fix warnings and typo in dshash  (Thomas Munro <thomas.munro@enterprisedb.com>)
Список pgsql-hackers
On Sun, Sep 3, 2017 at 2:56 PM, Thomas Munro
<thomas.munro@enterprisedb.com> wrote:
> On Sun, Sep 3, 2017 at 6:57 PM, Amit Kapila <amit.kapila16@gmail.com> wrote:
>> I am seeing below warnings (on Win7) in dshash.c
>>
>> 1>  dshash.c
>> 1>src/backend/lib/dshash.c(318): warning C4334: '<<' : result of
>> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
>> intended?)
>> 1>src/backend/lib/dshash.c(679): warning C4334: '<<' : result of
>> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
>> intended?)
>> 1>src/backend/lib/dshash.c(713): warning C4334: '<<' : result of
>> 32-bit shift implicitly converted to 64 bits (was 64-bit shift
>> intended?)
>
> Thanks!  That's a handy warning to have.  I see that it is also
> visible on the build farm:
>
> https://buildfarm.postgresql.org/cgi-bin/show_stage_log.pl?nm=caecilian&dt=2017-09-02%2019%3A30%3A30&stg=make
>
> Aside from these 3 warnings, it looks like the other 17 are all
> "warning C4005: 'HAVE_LONG_LONG_INT_64': macro redefinition".  I
> wonder if it would make sense to fix that too and then turn on the
> MSVC equivalent of -Werror=xxx on a build farm animal...
>
>> Attached a patch to fix the above warning.
>
> I think it should be (size_t) 1, not UINT64CONST(1).  See attached.
>

Okay, that makes sense.  Do you think we should also change type
casting in BUCKETS_PER_PARTITION so that we are consistent?


-- 
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Amit Kapila
Дата:
Сообщение: Re: [HACKERS] UPDATE of partition key
Следующее
От: Tatsuro Yamada
Дата:
Сообщение: Re: [HACKERS] CLUSTER command progress monitor