[REPORT] Static analys warnings

From: Ranier Vilela <ranier(dot)vf(at)gmail(dot)com>
To: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: [REPORT] Static analys warnings
Date: 2020-05-03 20:05:54
Message-ID: CAEudQApOgzD25Mar2x-KxBrSFNWyqceS7uymsYEHmhzhbHRbNw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

1. Warning: the right operand to | always evaluates to 0

src/include/storage/bufpage.h
#define PAI_OVERWRITE (1 << 0)
#define PAI_IS_HEAP (1 << 1)

#define PageAddItem(page, item, size, offsetNumber, overwrite, is_heap) \
PageAddItemExtended(page, item, size, offsetNumber, \
((overwrite) ? PAI_OVERWRITE : 0) | \
((is_heap) ? PAI_IS_HEAP : 0))

Typo | should be ||:
((overwrite) ? PAI_OVERWRITE : 0) || \
((is_heap) ? PAI_IS_HEAP : 0))

regards,
Ranier Vilela

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Andres Freund 2020-05-03 21:20:12 Re: [REPORT] Static analys warnings
Previous Message Ranier Vilela 2020-05-03 19:23:24 Re: Postgres Windows build system doesn't work with python installed in Program Files