lib/pager: fix compiler warning [-Wrestrict]

lib/pager.c: In function ‘pager_preexec’:
lib/pager.c:148:12: warning: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Wrestrict]

Signed-off-by: Karel Zak <kzak@redhat.com>
This commit is contained in:
Karel Zak 2018-07-18 09:41:46 +02:00
parent 342c66dee8
commit 3b6ca044da
1 changed files with 4 additions and 2 deletions

View File

@ -141,11 +141,13 @@ static void pager_preexec(void)
* Work around bug in "less" by not starting it until we
* have real input
*/
fd_set in;
fd_set in, ex;
FD_ZERO(&in);
FD_SET(STDIN_FILENO, &in);
select(1, &in, NULL, &in, NULL);
ex = in;
select(STDIN_FILENO + 1, &in, NULL, &ex, NULL);
if (setenv("LESS", "FRSX", 0) != 0)
warn(_("failed to set the %s environment variable"), "LESS");