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

Unified Diff: base/compiler_specific.h

Issue 11494: Generate a warning if the return value of FilePath::Append is ignored. (Closed)
Patch Set: Created 12 years, 1 month 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 | base/file_path.h » ('j') | 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 4ab4c915133e8a3e561116e446efa4f3ee2f9bf6..b07b18c910886a30e9acb23413486b9c344136f7 100644
--- a/base/compiler_specific.h
+++ b/base/compiler_specific.h
@@ -50,7 +50,7 @@
code \
MSVC_POP_WARNING()
-#else // COMPILER_MSVC
+#else // Not MSVC
#define MSVC_SUPPRESS_WARNING(n)
#define MSVC_PUSH_DISABLE_WARNING(n)
@@ -60,5 +60,11 @@
#endif // COMPILER_MSVC
-#endif // BASE_COMPILER_SPECIFIC_H_
+#if defined(COMPILER_GCC)
+#define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
+#else // Not GCC
+#define WARN_UNUSED_RESULT
+#endif
+
+#endif // BASE_COMPILER_SPECIFIC_H_
« no previous file with comments | « no previous file | base/file_path.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698