diff options
author | Moonchild <moonchild@palemoon.org> | 2023-11-04 22:57:30 +0100 |
---|---|---|
committer | Moonchild <moonchild@palemoon.org> | 2023-11-08 13:49:08 +0100 |
commit | 6f7a751520896b95c6eef986f841def329cdb20e (patch) | |
tree | 9e8a2a592151cf0fbda93ffd5a61815885ed2654 | |
parent | 037fb1d1238e6ff09f19b63352baba365994d449 (diff) | |
download | uxp-6f7a751520896b95c6eef986f841def329cdb20e.tar.gz |
Issue #2342: Use [[nodiscard]] in /memory and remove Sun Studio hack
-rw-r--r-- | memory/mozalloc/mozalloc.h | 12 |
1 files 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) */ |