On Sun, Oct 24, 2021 at 02:27:55PM +0200, Frederic Cambus wrote:
> Hi tech@,
> 
> This diff removes mentions of ld warning messages for mktemp(3),
> tmpnam(3), and tempnam(3).
> 
> LLD doesn't emit warnings when encountering .gnu.warning.* sections, so
> those warnings are not emitted anymore for a majority of users since we
> switched to LLD as the default linker on most architectures.
> 
> Manual pages for other libc functions for which we have .gnu.warning.*
> sections did not mention ld warnings. For the record, those functions
> are: getwd(3), rand(3), rand_r(3), random(3), sprintf(3), stpcpy(3),
> strcat(3), strcpy(3), vsprintf(3), wcscat(3), and wcscpy(3).
> 
> Comments? OK?

Shouldn't lld instead be changed to show warnings?

> 
> Index: lib/libc/stdio/mktemp.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/stdio/mktemp.3,v
> retrieving revision 1.54
> diff -u -p -r1.54 mktemp.3
> --- lib/libc/stdio/mktemp.3   26 Oct 2014 12:54:18 -0000      1.54
> +++ lib/libc/stdio/mktemp.3   24 Oct 2021 10:38:29 -0000
> @@ -408,8 +408,3 @@ Whenever it is possible,
>  or
>  .Fn mkdtemp
>  should be used instead.
> -.Pp
> -For this reason,
> -.Xr ld 1
> -will output a warning message whenever it links code that uses
> -.Fn mktemp .
> Index: lib/libc/stdio/tmpnam.3
> ===================================================================
> RCS file: /cvs/src/lib/libc/stdio/tmpnam.3,v
> retrieving revision 1.23
> diff -u -p -r1.23 tmpnam.3
> --- lib/libc/stdio/tmpnam.3   30 Aug 2019 23:33:45 -0000      1.23
> +++ lib/libc/stdio/tmpnam.3   24 Oct 2021 10:38:29 -0000
> @@ -219,10 +219,3 @@ temporary files are created.
>  .Pp
>  This implementation does not have these flaws, but portable software
>  cannot depend on that.
> -.Pp
> -For these reasons,
> -.Xr ld 1
> -will output a warning message whenever it links code that uses the functions
> -.Fn tmpnam
> -or
> -.Fn tempnam .
> 
> 

Reply via email to