Re: fix compile warning for pg_backup_tar.c

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема Re: fix compile warning for pg_backup_tar.c
Дата
Msg-id 200411081903.23315.peter_e@gmx.net
обсуждение исходный текст
Ответ на fix compile warning for pg_backup_tar.c  (Andrew Dunstan <andrew@dunslane.net>)
Ответы Re: fix compile warning for pg_backup_tar.c
Список pgsql-patches
Andrew Dunstan wrote:
> Yet another fix for a useless compile warning. This one is slightly
> ugly ;-(

First of all, ugly code needs to be documented in the code.

Then, the diff

+ #ifdef INT64_IS_BUSTED
        if (th->fileLen > MAX_TAR_MEMBER_FILELEN)
+ #else
+       if (((int64) th->fileLen -1) >= MAX_TAR_MEMBER_FILELEN)
+ #endif

seems to imply that the current code corresponds to INT64_IS_BUSTED,
which obviously defies reason.

I remember when I wrote that code I consciously let the compile warning
stand for platforms with busted int64 because it became too confusing
to fix.  Maybe you can clear that up for us. :)

--
Peter Eisentraut
http://developer.postgresql.org/~petere/


В списке pgsql-patches по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Enhanced PITR doc patch
Следующее
От: Tom Lane
Дата:
Сообщение: Re: fix compile warning for pg_backup_tar.c