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

Side by Side Diff: chrome/browser/safe_browsing/incident_reporting/verifier_test/verifier_test_dll.cc

Issue 1428673005: win/clang: Fix a -Wmicrosoft-cast warning. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 // Some pointless code that will become a DLL with some exports and relocs. 5 // Some pointless code that will become a DLL with some exports and relocs.
6 6
7 #include <windows.h> 7 #include <windows.h>
8 8
9 namespace { 9 namespace {
10 10
11 void* g_somestate = nullptr; 11 void (*g_somestate)(int) = nullptr;
12 int g_somevalue = 0; 12 int g_somevalue = 0;
13 13
14 } // namespace 14 } // namespace
15 15
16 extern "C" 16 extern "C"
17 void DummyExport(int foo) { 17 void DummyExport(int foo) {
18 g_somevalue = foo; 18 g_somevalue = foo;
19 } 19 }
20 20
21 extern "C" 21 extern "C"
22 BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) { 22 BOOL APIENTRY DllMain(HMODULE module, DWORD reason, LPVOID reserved) {
23 if (reason == DLL_PROCESS_ATTACH) 23 if (reason == DLL_PROCESS_ATTACH)
24 g_somestate = &DummyExport; 24 g_somestate = &DummyExport;
25 else if (reason == DLL_PROCESS_DETACH) 25 else if (reason == DLL_PROCESS_DETACH)
26 g_somestate = nullptr; 26 g_somestate = nullptr;
27 27
28 return TRUE; 28 return TRUE;
29 } 29 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698