diff options
-rw-r--r-- | base/process_util_posix.cc | 8 | ||||
-rw-r--r-- | base/tuple_unittest.cc | 4 | ||||
-rw-r--r-- | chrome/browser/autofill/autofill_xml_parser.h | 2 | ||||
-rw-r--r-- | chrome/browser/extensions/extension_accessibility_api_constants.cc | 18 | ||||
-rw-r--r-- | chrome/browser/sessions/tab_restore_service.h | 1 | ||||
-rw-r--r-- | chrome/common/extensions/extension_message_bundle.h | 1 | ||||
-rw-r--r-- | chrome/common/process_watcher_posix.cc | 4 | ||||
-rw-r--r-- | media/audio/linux/alsa_output.h | 2 | ||||
-rw-r--r-- | printing/pdf_ps_metafile_cairo.cc | 9 | ||||
-rw-r--r-- | printing/pdf_ps_metafile_cairo.h | 2 | ||||
-rw-r--r-- | third_party/libjingle/files/talk/base/stringutils.h | 18 | ||||
-rw-r--r-- | webkit/tools/test_shell/test_shell_switches.cc | 9 |
12 files changed, 43 insertions, 35 deletions
diff --git a/base/process_util_posix.cc b/base/process_util_posix.cc index 25428fd..ec5f06c 100644 --- a/base/process_util_posix.cc +++ b/base/process_util_posix.cc @@ -221,12 +221,12 @@ void CloseSuperfluousFds(const base::InjectiveMultimap& saved_mapping) { const int fd = static_cast<int>(i); if (fd == STDIN_FILENO || fd == STDOUT_FILENO || fd == STDERR_FILENO) continue; - InjectiveMultimap::const_iterator i; - for (i = saved_mapping.begin(); i != saved_mapping.end(); i++) { - if (fd == i->dest) + InjectiveMultimap::const_iterator j; + for (j = saved_mapping.begin(); j != saved_mapping.end(); j++) { + if (fd == j->dest) break; } - if (i != saved_mapping.end()) + if (j != saved_mapping.end()) continue; // Since we're just trying to close anything we can find, diff --git a/base/tuple_unittest.cc b/base/tuple_unittest.cc index 65a3757..402394c 100644 --- a/base/tuple_unittest.cc +++ b/base/tuple_unittest.cc @@ -3,6 +3,8 @@ // found in the LICENSE file. #include "base/tuple.h" + +#include "base/compiler_specific.h" #include "testing/gtest/include/gtest/gtest.h" namespace { @@ -28,7 +30,7 @@ struct Addz { } // namespace TEST(TupleTest, Basic) { - Tuple0 t0 = MakeTuple(); + Tuple0 t0 ALLOW_UNUSED = MakeTuple(); Tuple1<int> t1(1); Tuple2<int, const char*> t2 = MakeTuple(1, static_cast<const char*>("wee")); Tuple3<int, int, int> t3(1, 2, 3); diff --git a/chrome/browser/autofill/autofill_xml_parser.h b/chrome/browser/autofill/autofill_xml_parser.h index d54dc67..1fda2fe 100644 --- a/chrome/browser/autofill/autofill_xml_parser.h +++ b/chrome/browser/autofill/autofill_xml_parser.h @@ -13,8 +13,6 @@ #include "third_party/expat/files/lib/expat.h" #include "third_party/libjingle/files/talk/xmllite/xmlparser.h" -enum UploadRequired; - // The base class that contains common functionality between // AutoFillQueryXmlParser and AutoFillUploadXmlParser. class AutoFillXmlParser : public buzz::XmlParseHandler { diff --git a/chrome/browser/extensions/extension_accessibility_api_constants.cc b/chrome/browser/extensions/extension_accessibility_api_constants.cc index 8f52e14..81e60e8 100644 --- a/chrome/browser/extensions/extension_accessibility_api_constants.cc +++ b/chrome/browser/extensions/extension_accessibility_api_constants.cc @@ -26,14 +26,14 @@ const char kOnControlAction[] = "experimental.accessibility.onControlAction"; const char kOnTextChanged[] = "experimental.accessibility.onTextChanged"; // Types of controls that can receive accessibility events. -extern const char kTypeButton[] = "button"; -extern const char kTypeCheckbox[] = "checkbox"; -extern const char kTypeComboBox[] = "combobox"; -extern const char kTypeLink[] = "link"; -extern const char kTypeListBox[] = "listbox"; -extern const char kTypeRadioButton[] = "radiobutton"; -extern const char kTypeTab[] = "tab"; -extern const char kTypeTextBox[] = "textbox"; -extern const char kTypeWindow[] = "window"; +const char kTypeButton[] = "button"; +const char kTypeCheckbox[] = "checkbox"; +const char kTypeComboBox[] = "combobox"; +const char kTypeLink[] = "link"; +const char kTypeListBox[] = "listbox"; +const char kTypeRadioButton[] = "radiobutton"; +const char kTypeTab[] = "tab"; +const char kTypeTextBox[] = "textbox"; +const char kTypeWindow[] = "window"; } // namespace extension_accessibility_api_constants diff --git a/chrome/browser/sessions/tab_restore_service.h b/chrome/browser/sessions/tab_restore_service.h index f8488e1..8aacc9c 100644 --- a/chrome/browser/sessions/tab_restore_service.h +++ b/chrome/browser/sessions/tab_restore_service.h @@ -13,6 +13,7 @@ #include "base/time.h" #include "chrome/browser/sessions/base_session_service.h" #include "chrome/browser/sessions/session_id.h" +#include "chrome/browser/sessions/session_types.h" class Browser; class NavigationController; diff --git a/chrome/common/extensions/extension_message_bundle.h b/chrome/common/extensions/extension_message_bundle.h index d483ba0..3085b50 100644 --- a/chrome/common/extensions/extension_message_bundle.h +++ b/chrome/common/extensions/extension_message_bundle.h @@ -10,6 +10,7 @@ #include <vector> #include "base/linked_ptr.h" +#include "base/string_util.h" #include "base/values.h" // Contains localized extension messages for one locale. Any messages that the diff --git a/chrome/common/process_watcher_posix.cc b/chrome/common/process_watcher_posix.cc index c0ea178..4b13c32 100644 --- a/chrome/common/process_watcher_posix.cc +++ b/chrome/common/process_watcher_posix.cc @@ -10,6 +10,7 @@ #include <sys/wait.h> #include "base/eintr_wrapper.h" +#include "base/logging.h" #include "base/platform_thread.h" // Return true if the given child is dead. This will also reap the process. @@ -65,7 +66,8 @@ class BackgroundReaper : public PlatformThread::Delegate { if (kill(child_, SIGKILL) == 0) { // SIGKILL is uncatchable. Since the signal was delivered, we can // just wait for the process to die now in a blocking manner. - HANDLE_EINTR(waitpid(child_, NULL, 0)); + if (HANDLE_EINTR(waitpid(child_, NULL, 0)) < 0) + PLOG(WARNING) << "waitpid"; } else { LOG(ERROR) << "While waiting for " << child_ << " to terminate we" << " failed to deliver a SIGKILL signal (" << errno << ")."; diff --git a/media/audio/linux/alsa_output.h b/media/audio/linux/alsa_output.h index 240076a..5900f77 100644 --- a/media/audio/linux/alsa_output.h +++ b/media/audio/linux/alsa_output.h @@ -133,7 +133,7 @@ class AlsaPcmOutputStream : kIsStopped, kIsClosed }; - friend std::ostream& ::operator<<(std::ostream& os, InternalState); + friend std::ostream& operator<<(std::ostream& os, InternalState); // Various tasks that complete actions started in the public API. void OpenTask(uint32 packet_size); diff --git a/printing/pdf_ps_metafile_cairo.cc b/printing/pdf_ps_metafile_cairo.cc index 31c1e8a..fc2efda 100644 --- a/printing/pdf_ps_metafile_cairo.cc +++ b/printing/pdf_ps_metafile_cairo.cc @@ -358,8 +358,13 @@ bool PdfPsMetafile::SaveTo(const base::FileDescriptor& fd) const { success = false; } - if (fd.auto_close) - HANDLE_EINTR(close(fd.fd)); + if (fd.auto_close) { + if (HANDLE_EINTR(close(fd.fd)) < 0) { + DPLOG(WARNING) << "close"; + success = false; + } + } + return success; } diff --git a/printing/pdf_ps_metafile_cairo.h b/printing/pdf_ps_metafile_cairo.h index eff10d1..9930f5b 100644 --- a/printing/pdf_ps_metafile_cairo.h +++ b/printing/pdf_ps_metafile_cairo.h @@ -13,7 +13,7 @@ typedef struct _cairo_surface cairo_surface_t; typedef struct _cairo cairo_t; namespace base { -class FileDescriptor; +struct FileDescriptor; } class FilePath; diff --git a/third_party/libjingle/files/talk/base/stringutils.h b/third_party/libjingle/files/talk/base/stringutils.h index 2ad071a..03fb749 100644 --- a/third_party/libjingle/files/talk/base/stringutils.h +++ b/third_party/libjingle/files/talk/base/stringutils.h @@ -200,15 +200,6 @@ size_t strcatn(CTYPE* buffer, size_t buflen, } template<class CTYPE> -size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) { - va_list args; - va_start(args, format); - size_t len = vsprintfn(buffer, buflen, format, args); - va_end(args); - return len; -} - -template<class CTYPE> size_t vsprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, va_list args) { int len = vsnprintf(buffer, buflen, format, args); @@ -219,6 +210,15 @@ size_t vsprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, return len; } +template<class CTYPE> +size_t sprintfn(CTYPE* buffer, size_t buflen, const CTYPE* format, ...) { + va_list args; + va_start(args, format); + size_t len = vsprintfn(buffer, buflen, format, args); + va_end(args); + return len; +} + /////////////////////////////////////////////////////////////////////////////// // Allow safe comparing and copying ascii (not UTF-8) with both wide and // non-wide character strings. diff --git a/webkit/tools/test_shell/test_shell_switches.cc b/webkit/tools/test_shell/test_shell_switches.cc index d0bf04c..0769525 100644 --- a/webkit/tools/test_shell/test_shell_switches.cc +++ b/webkit/tools/test_shell/test_shell_switches.cc @@ -72,17 +72,16 @@ const char kAllowScriptsToCloseWindows[] = "allow-scripts-to-close-windows"; // Test the system dependencies (themes, fonts, ...). When this flag is // specified, the test shell will exit immediately with either 0 (success) or // 1 (failure). Combining with other flags has no effect. -extern const char kCheckLayoutTestSystemDeps[] = - "check-layout-test-sys-deps"; +const char kCheckLayoutTestSystemDeps[] = "check-layout-test-sys-deps"; // If set, we are running under GDB so allow a certain class of errors // to happen even if in layout test mode. -extern const char kGDB[] = "gdb"; +const char kGDB[] = "gdb"; // Make functions of the Profiler class available in javascript -extern const char kProfiler[] = "profiler"; +const char kProfiler[] = "profiler"; // Make functions of the HeapProfiler class available in javascript -extern const char kHeapProfiler[] = "heap-profiler"; +const char kHeapProfiler[] = "heap-profiler"; } // namespace test_shell |