Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

tools/lib/subcmd/pager.c: do not alias select() params

Use a separate fd set for select()-s exception fds param to fix the
following gcc warning:

pager.c:36:12: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
select(1, &in, NULL, &in, NULL);
^~~ ~~~

Link: http://lkml.kernel.org/r/20180101105626.7168-1-sergey.senozhatsky@gmail.com
Signed-off-by: Sergey Senozhatsky <sergey.senozhatsky@gmail.com>
Cc: Arnaldo Carvalho de Melo <acme@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Sergey Senozhatsky and committed by
Linus Torvalds
ad343a98 dfbc3c6c

+4 -1
+4 -1
tools/lib/subcmd/pager.c
··· 30 30 * have real input 31 31 */ 32 32 fd_set in; 33 + fd_set exception; 33 34 34 35 FD_ZERO(&in); 36 + FD_ZERO(&exception); 35 37 FD_SET(0, &in); 36 - select(1, &in, NULL, &in, NULL); 38 + FD_SET(0, &exception); 39 + select(1, &in, NULL, &exception, NULL); 37 40 38 41 setenv("LESS", "FRSX", 0); 39 42 }