1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-10-19 02:29:40 +00:00

libc/tests/stdlib/dynthr_mod/dynthr_mod.c: mark dummy as used

It receives the malloc() result, and we do not want the malloc() call
to be optimized out, which is allowed for hosted compiler.  Use dummy
for actual write though.

Sponsored by:	The FreeBSD Foundation
MFC after:	1 week
This commit is contained in:
Konstantin Belousov 2021-11-28 05:25:28 +02:00
parent e8b6309c70
commit a64a3b7988

View File

@ -51,6 +51,7 @@ mod_thread(void *ptr __unused)
char *volatile dummy; char *volatile dummy;
dummy = malloc(500); dummy = malloc(500);
*dummy = 'a';
return (NULL); return (NULL);
} }