diff options
author | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 23:58:09 +0000 |
---|---|---|
committer | agl@chromium.org <agl@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2008-11-21 23:58:09 +0000 |
commit | dd9afc0b5666f35137c850c8cc625750ae49c223 (patch) | |
tree | 4af8b935421350c2a38c4a5e81e2ffb95f4101f8 /base/file_path.h | |
parent | 6412d3264acd71864fc82ce968fb78d1d1ce1d7e (diff) | |
download | chromium_src-dd9afc0b5666f35137c850c8cc625750ae49c223.zip chromium_src-dd9afc0b5666f35137c850c8cc625750ae49c223.tar.gz chromium_src-dd9afc0b5666f35137c850c8cc625750ae49c223.tar.bz2 |
Generate a warning if the return value of FilePath::Append is ignored.
There's currently a GCC bug which stops this working for return values which have a destructor. Hopefully this will help someone in the future, with future versions of GCC.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=38172
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=31742
Review URL: http://codereview.chromium.org/11494
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@5871 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'base/file_path.h')
-rw-r--r-- | base/file_path.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/base/file_path.h b/base/file_path.h index 6bb426f..1ebb299 100644 --- a/base/file_path.h +++ b/base/file_path.h @@ -67,6 +67,7 @@ #include <string> +#include "base/compiler_specific.h" #include "base/basictypes.h" // Windows-style drive letter support and pathname separator characters can be @@ -141,7 +142,7 @@ class FilePath { // If this object's path is kCurrentDirectory, a new FilePath corresponding // only to |component| is returned. |component| must be a relative path; // it is an error to pass an absolute path. - FilePath Append(const StringType& component) const; + FilePath Append(const StringType& component) const WARN_UNUSED_RESULT; // Returns true if this FilePath contains an absolute path. On Windows, an // absolute path begins with either a drive letter specification followed by |