tee: tune when later -p overrides earlier
commit0789451237b90324a5d1f5c1b9fbaa5099f4c072
authorPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Mar 2023 20:18:18 +0000 (4 12:18 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sat, 4 Mar 2023 22:49:45 +0000 (4 14:49 -0800)
treec6ef3a4a3ba31d975603b25e45e2c85dfb2a8a71
parent76b5843ff99977107580cd581213ea2b5b3a81a7
tee: tune when later -p overrides earlier

* src/tee.c (pipe_check): Make this a local var instead
of a static var.  This suppresses a -Wmaybe-uninitialized
diagnostic with gcc 12.2.1 20221121 (Red Hat 12.2.1-4).
(main): Don’t set pipe_check unnecessarily if a later
-p option overrides an earlier one that wants pipe_check.
Problem discovered when I investigated the GCC warning.
src/tee.c