Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix coverityscan logically dead code #6607

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
6 changes: 2 additions & 4 deletions src/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -1037,17 +1037,15 @@ ts_relation_size_impl(Oid relid)
static int64
ts_try_relation_cached_size(Relation rel, bool verbose)
{
BlockNumber result = 0, nblocks = 0;
BlockNumber result = InvalidBlockNumber, nblocks = 0;
ForkNumber forkNum;
bool cached = true;

/* Get heap size, including FSM and VM */
for (forkNum = 0; forkNum <= MAX_FORKNUM; forkNum++)
{
#if PG14_LT
#if PG14_GE
/* PG13 does not have smgr_cached_nblocks */
result = InvalidBlockNumber;
#else
result = RelationGetSmgr(rel)->smgr_cached_nblocks[forkNum];
#endif

Expand Down