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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « no previous file | base/file_path.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef BASE_COMPILER_SPECIFIC_H_ 5 #ifndef BASE_COMPILER_SPECIFIC_H_
6 #define BASE_COMPILER_SPECIFIC_H_ 6 #define BASE_COMPILER_SPECIFIC_H_
7 7
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 9
10 #if defined(COMPILER_MSVC) 10 #if defined(COMPILER_MSVC)
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 // 43 //
44 // Example usage: 44 // Example usage:
45 // Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {} 45 // Foo::Foo() : x(NULL), ALLOW_THIS_IN_INITIALIZER_LIST(y(this)), z(3) {}
46 // 46 //
47 // Compiler warning C4355: 'this': used in base member initializer list: 47 // Compiler warning C4355: 'this': used in base member initializer list:
48 // http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx 48 // http://msdn.microsoft.com/en-us/library/3c594ae3(VS.80).aspx
49 #define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \ 49 #define ALLOW_THIS_IN_INITIALIZER_LIST(code) MSVC_PUSH_DISABLE_WARNING(4355) \
50 code \ 50 code \
51 MSVC_POP_WARNING() 51 MSVC_POP_WARNING()
52 52
53 #else // COMPILER_MSVC 53 #else // Not MSVC
54 54
55 #define MSVC_SUPPRESS_WARNING(n) 55 #define MSVC_SUPPRESS_WARNING(n)
56 #define MSVC_PUSH_DISABLE_WARNING(n) 56 #define MSVC_PUSH_DISABLE_WARNING(n)
57 #define MSVC_PUSH_WARNING_LEVEL(n) 57 #define MSVC_PUSH_WARNING_LEVEL(n)
58 #define MSVC_POP_WARNING() 58 #define MSVC_POP_WARNING()
59 #define ALLOW_THIS_IN_INITIALIZER_LIST(code) code 59 #define ALLOW_THIS_IN_INITIALIZER_LIST(code) code
60 60
61 #endif // COMPILER_MSVC 61 #endif // COMPILER_MSVC
62 62
63
64 #if defined(COMPILER_GCC)
65 #define WARN_UNUSED_RESULT __attribute__((warn_unused_result))
66 #else // Not GCC
67 #define WARN_UNUSED_RESULT
68 #endif
69
63 #endif // BASE_COMPILER_SPECIFIC_H_ 70 #endif // BASE_COMPILER_SPECIFIC_H_
64
OLDNEW
« 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