On 3/9/21 7:38 PM, Nick Bowler wrote:
The fix is simple; why not fix it?

In this case heirloom-sh is not an actual porting target but is merely a tool being used to find portability bugs, and apparently it's generating a false alarm, and I'd rather avoid code churn due to problems that aren't bugs but are merely limitations in analysis tools.

Generally speaking it's better to fix faulty analysis tools than to contort code to make the tools happy. There are some exceptions to this general rule, for analysis tools that are exceptionally useful in finding real bugs but have a few false alarms. However, this doesn't appear to be an exceptional case, as this sort of code should never tickle any bug in a real porting target (Solaris /bin/sh, HP-UX 11 /bin/sh, etc.).

Reply via email to