Bug 1333686 - Part 3: Fix -Wmacro-redefined warnings in ipc/chromium. r=jld

The WARN_UNUSED_RESULT macro is defined in multiple Google header files in ipc/chromium and webrtc. Copy the WARN_UNUSED_RESULT definition from the latest security/sandbox/chromium/base/compiler_specific.h to our ipc/chromium code. Also remove the ALLOW_UNUSED macro definition because it is no longer defined in the latest compiler_specific.h and is not used anywhere.

Warning: -Wmacro-redefined in ipc/chromium/src/base/compiler_specific.h: 'WARN_UNUSED_RESULT' macro redefined
ipc/chromium/src/base/compiler_specific.h:73:9: warning: 'WARN_UNUSED_RESULT' macro redefined [-Wmacro-redefined]
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))

media/webrtc/trunk/webrtc/typedefs.h:152:9: note: previous definition is here
#define WARN_UNUSED_RESULT __attribute__ ((__warn_unused_result__))

MozReview-Commit-ID: EUIlXGKLhDL

--HG--
extra : rebase_source : 4c584dfa2243514aef0357ff919d1cba48bd8b86
This commit is contained in:
Chris Peterson 2017-01-16 19:14:52 -08:00
Родитель 7851892f9e
Коммит 4652559dd8
1 изменённых файлов: 7 добавлений и 5 удалений

Просмотреть файл

@ -67,12 +67,14 @@
#endif // COMPILER_MSVC
#if defined(COMPILER_GCC)
#define ALLOW_UNUSED __attribute__((unused))
// Annotate a function indicating the caller must examine the return value.
// Use like:
// int foo() WARN_UNUSED_RESULT;
// To explicitly ignore a result, see |ignore_result()| in base/macros.h.
#undef WARN_UNUSED_RESULT
#if defined(COMPILER_GCC) || defined(__clang__)
#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
#else // Not GCC
#define ALLOW_UNUSED
#else
#define WARN_UNUSED_RESULT
#endif