mirror of
https://bitbucket.org/chromiumembedded/cef
synced 2025-06-05 21:39:12 +02:00
- 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:
@ -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
|
||||
|
||||
|
Reference in New Issue
Block a user