svn commit: r327751 - head/include
Pedro F. Giffuni
pfg at FreeBSD.org
Tue Jan 9 22:48:14 UTC 2018
Author: pfg
Date: Tue Jan 9 22:48:13 2018
New Revision: 327751
URL: https://svnweb.freebsd.org/changeset/base/327751
Log:
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
Modified:
head/include/stdlib.h
Modified: head/include/stdlib.h
==============================================================================
--- head/include/stdlib.h Tue Jan 9 22:00:06 2018 (r327750)
+++ head/include/stdlib.h Tue Jan 9 22:48:13 2018 (r327751)
@@ -304,7 +304,7 @@ int radixsort(const unsigned char **, int, const unsi
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 *,
More information about the svn-src-all
mailing list