- Change ALLOW_UNUSED to ALLOW_UNUSED_TYPE and ALLOW_UNUSED_LOCAL to match Chromium.

- Windows: d3dcompiler_46.dll changed to d3dcompiler_47.dll due to 8.1 SDK update (issue #1484).
- Windows: Fix `local variable is initialized but not referenced` warning with Release build (issue #1484).

git-svn-id: https://chromiumembedded.googlecode.com/svn/trunk@1962 5089003a-bbd8-11dd-ad1f-f1f9622dbc98
This commit is contained in:
Marshall Greenblatt
2015-01-08 02:42:59 +00:00
parent 7fe86e0b26
commit b5e8914bde
8 changed files with 27 additions and 22 deletions

View File

@ -160,18 +160,26 @@
#endif
#endif // WARN_UNUSED_RESULT
// Annotate a typedef or function indicating it's ok if it's not used.
// Use like:
// typedef Foo Bar ALLOW_UNUSED_TYPE;
#ifndef ALLOW_UNUSED_TYPE
#if defined(COMPILER_GCC)
#define ALLOW_UNUSED_TYPE __attribute__((unused))
#else
#define ALLOW_UNUSED_TYPE
#endif
#endif // ALLOW_UNUSED_TYPE
// Annotate a variable indicating it's ok if the variable is not used.
// (Typically used to silence a compiler warning when the assignment
// is important for some other reason.)
// Use like:
// int x ALLOW_UNUSED = ...;
#ifndef ALLOW_UNUSED
#if defined(COMPILER_GCC)
#define ALLOW_UNUSED __attribute__((unused))
#else
#define ALLOW_UNUSED
// int x = ...;
// ALLOW_UNUSED_LOCAL(x);
#ifndef ALLOW_UNUSED_LOCAL
#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
#endif
#endif // ALLOW_UNUSED
#endif // !BUILDING_CEF_SHARED