From dd5edb11b1baeb84dace48400c866ba234b22c16 Mon Sep 17 00:00:00 2001 From: "Pedro F. Giffuni" Date: Tue, 9 Jan 2018 22:48:13 +0000 Subject: Use the __result_use_check attribute also for reallocf(3). The GCC attribute causes a warning to be emitted if a caller of the function with this attribute does not use its return value. Unlike the traditional realloc, with reallocf(3) we don't have to check for NULL values but we still have to make sure the result is used. MFC after: 3 days --- include/stdlib.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include') diff --git a/include/stdlib.h b/include/stdlib.h index 56bb1566d58e9..b2fc90934f854 100644 --- a/include/stdlib.h +++ b/include/stdlib.h @@ -304,7 +304,7 @@ int radixsort(const unsigned char **, int, const unsigned char *, unsigned); void *reallocarray(void *, size_t, size_t) __result_use_check __alloc_size(2) __alloc_size(3); -void *reallocf(void *, size_t) __alloc_size(2); +void *reallocf(void *, size_t) __result_use_check __alloc_size(2); int rpmatch(const char *); void setprogname(const char *); int sradixsort(const unsigned char **, int, const unsigned char *, -- cgit v1.3