From 6f7a751520896b95c6eef986f841def329cdb20e Mon Sep 17 00:00:00 2001 From: Moonchild Date: Sat, 4 Nov 2023 22:57:30 +0100 Subject: Issue #2342: Use [[nodiscard]] in /memory and remove Sun Studio hack --- memory/mozalloc/mozalloc.h | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/memory/mozalloc/mozalloc.h b/memory/mozalloc/mozalloc.h index 8c224472c4..5448e5a1ee 100644 --- a/memory/mozalloc/mozalloc.h +++ b/memory/mozalloc/mozalloc.h @@ -33,14 +33,6 @@ #define MOZALLOC_HAVE_XMALLOC -/* Workaround build problem with Sun Studio 12 */ -#if defined(__SUNPRO_C) || defined(__SUNPRO_CC) -# undef MOZ_MUST_USE -# define MOZ_MUST_USE -# undef MOZ_ALLOCATOR -# define MOZ_ALLOCATOR -#endif - #if defined(__cplusplus) extern "C" { #endif /* ifdef __cplusplus */ @@ -95,10 +87,10 @@ MFBT_API char* moz_xstrndup(const char* str, size_t strsize) #if defined(HAVE_POSIX_MEMALIGN) -MFBT_API MOZ_MUST_USE +MFBT_API [[nodiscard]] int moz_xposix_memalign(void **ptr, size_t alignment, size_t size); -MFBT_API MOZ_MUST_USE +MFBT_API [[nodiscard]] int moz_posix_memalign(void **ptr, size_t alignment, size_t size); #endif /* if defined(HAVE_POSIX_MEMALIGN) */ -- cgit v1.2.3