mirror of
https://github.com/postgres/postgres.git
synced 2025-07-27 12:41:57 +03:00
Back-patch 9.4-era compiler warning fixes into older branches.
This applies portions of commitsb64b5ccb6
andb1aebbb6a
to the older branches, in hopes of getting -Werror builds to succeed there. The applied changes simply remove useless tests, eg checking an unsigned variable to see if it is >= 0. Recent versions of clang warn about such tests by default.
This commit is contained in:
@ -358,7 +358,7 @@ SetWALFileNameForCleanup(void)
|
||||
if (keepfiles > 0)
|
||||
{
|
||||
sscanf(nextWALFileName, "%08X%08X%08X", &tli, &log, &seg);
|
||||
if (tli > 0 && log >= 0 && seg > 0)
|
||||
if (tli > 0 && seg > 0)
|
||||
{
|
||||
log_diff = keepfiles / MaxSegmentsPerLogFile;
|
||||
seg_diff = keepfiles % MaxSegmentsPerLogFile;
|
||||
|
Reference in New Issue
Block a user