From 98c521ff90e7633071d92214c3dc7cd44ddaf18d Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 13 Apr 2021 00:31:54 +0000 Subject: [PATCH] fake-use alloca()'s return value to quieten -Werror=unused-result --- lib/libpthread/pthread.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/lib/libpthread/pthread.c b/lib/libpthread/pthread.c index 6b7d2bf2f064..c531dcbb94a3 100644 --- a/lib/libpthread/pthread.c +++ b/lib/libpthread/pthread.c @@ -1,4 +1,4 @@ -/* $NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $ */ +/* $NetBSD: pthread.c,v 1.179 2021/04/13 00:31:54 mrg Exp $ */ /*- * Copyright (c) 2001, 2002, 2003, 2006, 2007, 2008, 2020 @@ -31,7 +31,7 @@ */ #include -__RCSID("$NetBSD: pthread.c,v 1.178 2020/07/22 01:24:39 msaitoh Exp $"); +__RCSID("$NetBSD: pthread.c,v 1.179 2021/04/13 00:31:54 mrg Exp $"); #define __EXPOSE_STACK 1 @@ -535,6 +535,7 @@ pthread__create_tramp(void *cookie) { pthread_t self; void *retval; + void *junk __unused; self = cookie; @@ -544,7 +545,7 @@ pthread__create_tramp(void *cookie) * be allocating stacks on fixed 2MB boundaries. Needs a * thread register or decent thread local storage. */ - (void)alloca(((unsigned)self->pt_lid & 7) << 8); + junk = alloca(((unsigned)self->pt_lid & 7) << 8); if (self->pt_name != NULL) { pthread_mutex_lock(&self->pt_lock);