!4255 消除编译时逻辑比较符的括号警告

Merge pull request !4255 from xiyanziran/master-parentheses
This commit is contained in:
opengauss_bot
2023-10-24 02:56:32 +00:00
committed by Gitee
3 changed files with 4 additions and 4 deletions

View File

@ -1367,7 +1367,7 @@ HeapTuple ScanPgRelation(Oid targetRelId, bool indexOK, bool force_non_historic)
* relfilenode of non mapped system relations during decoding.
*/
snapshot = SnapshotNow;
if (HistoricSnapshotActive() && !force_non_historic || IS_EXRTO_RECOVERY_IN_PROGRESS) {
if ((HistoricSnapshotActive() && !force_non_historic) || IS_EXRTO_RECOVERY_IN_PROGRESS) {
snapshot = GetCatalogSnapshot();
}

View File

@ -790,7 +790,7 @@ void check_encoding_locale_matches(int encoding, const char* collate, const char
#ifdef WIN32
encoding == PG_UTF8 ||
#endif
(encoding == PG_SQL_ASCII && superuser() ||
((encoding == PG_SQL_ASCII && superuser()) ||
(encoding == PG_GB18030_2022 && ctype_encoding == PG_GB18030))))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),
@ -802,7 +802,7 @@ void check_encoding_locale_matches(int encoding, const char* collate, const char
#ifdef WIN32
encoding == PG_UTF8 ||
#endif
(encoding == PG_SQL_ASCII && superuser() ||
((encoding == PG_SQL_ASCII && superuser()) ||
(encoding == PG_GB18030_2022 && collate_encoding == PG_GB18030))))
ereport(ERROR,
(errcode(ERRCODE_INVALID_PARAMETER_VALUE),

View File

@ -1308,7 +1308,7 @@ bool PortalRun(
}
/* PortalRun using unique_sql_start_time as unique sql elapse start time */
if (IsNeedUpdateUniqueSQLStat(portal) && IS_UNIQUE_SQL_TRACK_TOP && IsTopUniqueSQL()
if ((IsNeedUpdateUniqueSQLStat(portal) && IS_UNIQUE_SQL_TRACK_TOP && IsTopUniqueSQL())
|| IS_UNIQUE_SQL_TRACK_ALL) {
instr_unique_sql_report_elapse_time(u_sess->unique_sql_cxt.unique_sql_start_time);
}