Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1575)

Unified Diff: base/compiler_specific.h

Issue 2838713002: Simplify ALLOW_UNUSED_LOCAL to use (void)x directly instead of conditionally. (Closed)
Patch Set: Removed ternary expr & alternative impl for ALLOW_UNUSED_LOCAL Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/compiler_specific.h
diff --git a/base/compiler_specific.h b/base/compiler_specific.h
index 0f4c058b3be43963d76c23b0b3b8ec89fc8b3767..34b0c2d7a2913f98c9b7faa10cc5ab7d7640b4c0 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -71,14 +71,13 @@
#endif // COMPILER_MSVC
-
// 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_LOCAL(x);
-#define ALLOW_UNUSED_LOCAL(x) false ? (void)x : (void)0
+#define ALLOW_UNUSED_LOCAL(x) (void)x
// Annotate a typedef or function indicating it's ok if it's not used.
// Use like:
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698