mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-08 02:14:43 +00:00
Bug 1202965 (part 1) - Add MOZ_UNUSED. r=froydnj.
This commit is contained in:
parent
bd0011b79c
commit
b5bc43ef27
@ -9,6 +9,8 @@
|
||||
|
||||
#include "mozilla/Types.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
namespace mozilla {
|
||||
|
||||
//
|
||||
@ -29,4 +31,11 @@ operator<<(const unused_t& /*unused*/, const T& /*unused*/)
|
||||
|
||||
} // namespace mozilla
|
||||
|
||||
#endif // __cplusplus
|
||||
|
||||
// An alternative to mozilla::unused for use in (a) C code and (b) code where
|
||||
// linking with unused.o is difficult.
|
||||
#define MOZ_UNUSED(expr) \
|
||||
do { if (expr) { (void)0; } } while (0)
|
||||
|
||||
#endif // mozilla_unused_h
|
||||
|
Loading…
Reference in New Issue
Block a user