CVSROOT: /cvs Module name: src Changes by: t...@cvs.openbsd.org 2023/02/03 08:55:59
Modified files: usr.bin/tput : tput.c Log message: Fix tput when compiled with clang-15 -O2 For some reason clang-15 doesn't like passing the uninitialized array of pointers nargv[] to the vararg function tparm(). With -O2 it optimizes the for loop preceding the tparm() call strangely, with the result that the argv[i] == NULL error is hit in most real-world usage. This broke naddy's fancy shell prompt among other things. Initialize nargv[] to appease the insatiable undefined behavior exploiter. ok jca millert