diff options
author | Sergey Senozhatsky <sergey.senozhatsky@gmail.com> | 2020-07-02 15:42:18 +0300 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2020-07-31 17:43:16 +0300 |
commit | db2bfe0bf5f1fe12c3bf86bd655a0ffd8a5d0e50 (patch) | |
tree | fe394206722b4e7fb9b44fb32d55d2523a5745f3 /tools | |
parent | f88efa4d6cb1fcacb9591979bacc6c57ec9d7c53 (diff) | |
download | linux-db2bfe0bf5f1fe12c3bf86bd655a0ffd8a5d0e50.tar.xz |
tools/lib/subcmd/pager.c: do not alias select() params
commit dfbc3c6cb747c074aa2ba0a10bbeea588d6dfda6 upstream.
[ Change applied file from tools/lib/subcmd/pager.c to
tools/perf/util/pager.c ]
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/perf/util/pager.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tools/perf/util/pager.c b/tools/perf/util/pager.c index 53ef006a951c..b301d779c4af 100644 --- a/tools/perf/util/pager.c +++ b/tools/perf/util/pager.c @@ -16,10 +16,13 @@ static void pager_preexec(void) * have real input */ fd_set in; + fd_set exception; FD_ZERO(&in); + FD_ZERO(&exception); FD_SET(0, &in); - select(1, &in, NULL, &in, NULL); + FD_SET(0, &exception); + select(1, &in, NULL, &exception, NULL); setenv("LESS", "FRSX", 0); } |