summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authordcheng <dcheng@chromium.org>2015-07-02 10:12:25 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-02 17:14:11 +0000
commit30a727d5ca1914eec9c2d1cf819affa6ecf881f3 (patch)
treeaf2f977c8d1344e45ef55fb7618d81bd4bae71f2
parentf497fb7a80fc1eeccec8f74f391151ab0ab59dbc (diff)
downloadchromium_src-30a727d5ca1914eec9c2d1cf819affa6ecf881f3.zip
chromium_src-30a727d5ca1914eec9c2d1cf819affa6ecf881f3.tar.gz
chromium_src-30a727d5ca1914eec9c2d1cf819affa6ecf881f3.tar.bz2
Fix some clang warnings with -Wmissing-braces in content.
Clang warns if there are missing braces around a subobject initializer. The most common idiom that triggers this is: STRUCT s = {0}; if the first field of STRUCT is itself a struct. This can be more simply written as: STRUCT s = {}; which also prevents the warning from firing. BUG=505297 Review URL: https://codereview.chromium.org/1215333002 Cr-Commit-Position: refs/heads/master@{#337236}
-rw-r--r--content/browser/accessibility/accessibility_win_browsertest.cc6
-rw-r--r--content/browser/accessibility/browser_accessibility_win.cc13
-rw-r--r--content/common/sandbox_win.cc2
3 files changed, 13 insertions, 8 deletions
diff --git a/content/browser/accessibility/accessibility_win_browsertest.cc b/content/browser/accessibility/accessibility_win_browsertest.cc
index 7c3480d..3dd69a7 100644
--- a/content/browser/accessibility/accessibility_win_browsertest.cc
+++ b/content/browser/accessibility/accessibility_win_browsertest.cc
@@ -885,8 +885,10 @@ IN_PROC_BROWSER_TEST_F(AccessibilityWinBrowserTest,
HRESULT hr = static_cast<IAccessible*>(document_accessible.get())
->QueryInterface(service_provider.Receive());
ASSERT_EQ(S_OK, hr);
- const GUID refguid = {0x0c539790, 0x12e4, 0x11cf,
- 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
+ const GUID refguid = {0x0c539790,
+ 0x12e4,
+ 0x11cf,
+ {0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8}};
base::win::ScopedComPtr<ISimpleDOMNode> document_isimpledomnode;
hr = static_cast<IServiceProvider*>(service_provider.get())
->QueryService(
diff --git a/content/browser/accessibility/browser_accessibility_win.cc b/content/browser/accessibility/browser_accessibility_win.cc
index 285f99d..deb97ef 100644
--- a/content/browser/accessibility/browser_accessibility_win.cc
+++ b/content/browser/accessibility/browser_accessibility_win.cc
@@ -28,12 +28,15 @@ namespace content {
// These nonstandard GUIDs are taken directly from the Mozilla sources
// (accessible/src/msaa/nsAccessNodeWrap.cpp); some documentation is here:
// http://developer.mozilla.org/en/Accessibility/AT-APIs/ImplementationFeatures/MSAA
-const GUID GUID_ISimpleDOM = {
- 0x0c539790, 0x12e4, 0x11cf,
- 0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8};
+const GUID GUID_ISimpleDOM = {0x0c539790,
+ 0x12e4,
+ 0x11cf,
+ {0xb6, 0x61, 0x00, 0xaa, 0x00, 0x4c, 0xd6, 0xd8}};
const GUID GUID_IAccessibleContentDocument = {
- 0xa5d8e1f3, 0x3571, 0x4d8f,
- 0x95, 0x21, 0x07, 0xed, 0x28, 0xfb, 0x07, 0x2e};
+ 0xa5d8e1f3,
+ 0x3571,
+ 0x4d8f,
+ {0x95, 0x21, 0x07, 0xed, 0x28, 0xfb, 0x07, 0x2e}};
const base::char16 BrowserAccessibilityWin::kEmbeddedCharacter = L'\xfffc';
diff --git a/content/common/sandbox_win.cc b/content/common/sandbox_win.cc
index 6db4759..ff602d0 100644
--- a/content/common/sandbox_win.cc
+++ b/content/common/sandbox_win.cc
@@ -272,7 +272,7 @@ bool ShouldSetJobLevel(const base::CommandLine& cmd_line) {
return true;
// ...or there is a job but the JOB_OBJECT_LIMIT_BREAKAWAY_OK limit is set.
- JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info = {0};
+ JOBOBJECT_EXTENDED_LIMIT_INFORMATION job_info = {};
if (!::QueryInformationJobObject(NULL,
JobObjectExtendedLimitInformation, &job_info,
sizeof(job_info), NULL)) {