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

Side by Side Diff: net/base/network_interfaces_unittest.cc

Issue 1513043002: clang/win: Let remaining chromium_code targets build with -Wextra. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: . Created 5 years 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 #include "net/base/network_interfaces.h" 5 #include "net/base/network_interfaces.h"
6 6
7 #include <string> 7 #include <string>
8 8
9 #include <ostream> 9 #include <ostream>
10 10
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
156 phlpapi_lib.GetFunctionPointer("ConvertInterfaceIndexToLuid")); 156 phlpapi_lib.GetFunctionPointer("ConvertInterfaceIndexToLuid"));
157 157
158 typedef NETIO_STATUS (WINAPI* ConvertInterfaceLuidToGuid)(NET_LUID*, 158 typedef NETIO_STATUS (WINAPI* ConvertInterfaceLuidToGuid)(NET_LUID*,
159 GUID*); 159 GUID*);
160 ConvertInterfaceLuidToGuid luid_to_guid = 160 ConvertInterfaceLuidToGuid luid_to_guid =
161 reinterpret_cast<ConvertInterfaceLuidToGuid>( 161 reinterpret_cast<ConvertInterfaceLuidToGuid>(
162 phlpapi_lib.GetFunctionPointer("ConvertInterfaceLuidToGuid")); 162 phlpapi_lib.GetFunctionPointer("ConvertInterfaceLuidToGuid"));
163 163
164 if (interface_to_luid && luid_to_guid) { 164 if (interface_to_luid && luid_to_guid) {
165 NET_LUID luid; 165 NET_LUID luid;
166 EXPECT_EQ(interface_to_luid(it->interface_index, &luid), NO_ERROR); 166 EXPECT_EQ(static_cast<DWORD>(NO_ERROR),
167 interface_to_luid(it->interface_index, &luid));
167 GUID guid; 168 GUID guid;
168 EXPECT_EQ(luid_to_guid(&luid, &guid), NO_ERROR); 169 EXPECT_EQ(static_cast<DWORD>(NO_ERROR), luid_to_guid(&luid, &guid));
169 LPOLESTR name; 170 LPOLESTR name;
170 StringFromCLSID(guid, &name); 171 StringFromCLSID(guid, &name);
171 EXPECT_STREQ(base::UTF8ToWide(it->name).c_str(), name); 172 EXPECT_STREQ(base::UTF8ToWide(it->name).c_str(), name);
172 CoTaskMemFree(name); 173 CoTaskMemFree(name);
173 continue; 174 continue;
174 } else { 175 } else {
175 EXPECT_LT(base::win::GetVersion(), base::win::VERSION_VISTA); 176 EXPECT_LT(base::win::GetVersion(), base::win::VERSION_VISTA);
176 EXPECT_LT(it->interface_index, 1u << 24u); // Must fit 0.x.x.x. 177 EXPECT_LT(it->interface_index, 1u << 24u); // Must fit 0.x.x.x.
177 EXPECT_NE(it->interface_index, 0u); // 0 means to use default. 178 EXPECT_NE(it->interface_index, 0u); // 0 means to use default.
178 } 179 }
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
746 TryChangeWifiOptions(0); 747 TryChangeWifiOptions(0);
747 TryChangeWifiOptions(WIFI_OPTIONS_DISABLE_SCAN); 748 TryChangeWifiOptions(WIFI_OPTIONS_DISABLE_SCAN);
748 TryChangeWifiOptions(WIFI_OPTIONS_MEDIA_STREAMING_MODE); 749 TryChangeWifiOptions(WIFI_OPTIONS_MEDIA_STREAMING_MODE);
749 TryChangeWifiOptions(WIFI_OPTIONS_DISABLE_SCAN | 750 TryChangeWifiOptions(WIFI_OPTIONS_DISABLE_SCAN |
750 WIFI_OPTIONS_MEDIA_STREAMING_MODE); 751 WIFI_OPTIONS_MEDIA_STREAMING_MODE);
751 } 752 }
752 753
753 } // namespace 754 } // namespace
754 755
755 } // namespace net 756 } // namespace net
OLDNEW
« no previous file with comments | « media/audio/win/core_audio_util_win_unittest.cc ('k') | net/http/http_auth_sspi_win_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698