regsub -all "(^|\n)(\[^\n\]*: warning: reference to compatibility glob\[^\n\]*\n?)" $text "\\1" text
# Or the OpenBSD ones.
- regsub -all "(^|\n)(\[^\n\]*: warning: \[^\n\]* is often misused, please use \[^\n\]*\n?)" $text "\\1" text
+i regsub -all "(^|\n)(\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*warning: \[^\n\]* is often misused, please use \[^\n\]*\n?)" $text "\\1" text
# GNU ld warns about functions marked as dangerous in GNU libc.
regsub -all "(^|\n)\[^\n\]*: In function\[^\n\]*\n\[^\n\]\[^\n\]*is dangerous\[^\n\]*" $text "" text