[REPORT] Static analys warnings - Mailing list pgsql-hackers

From Ranier Vilela
Subject [REPORT] Static analys warnings
Date
Msg-id CAEudQApOgzD25Mar2x-KxBrSFNWyqceS7uymsYEHmhzhbHRbNw@mail.gmail.com
Whole thread Raw
Responses Re: [REPORT] Static analys warnings
List 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

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Postgres Windows build system doesn't work with python installedin Program Files
Next
From: Andres Freund
Date:
Subject: Re: [REPORT] Static analys warnings