Bug 1462100 Cast to void* to avoid conversion errors on MinGW, which does not do the automatic conversion like msvc r?bobowen draft
authorTom Ritter <tom@mozilla.com>
Wed, 16 May 2018 14:18:20 -0500
changeset 796357 94cfd05ce44b9c7dd384e9e38dbe057d53641301
parent 796356 85e508886963c70bbfbf2f72b4dab7440f80bf13
child 796358 cc82d4d30e5b490ee394fdfc7edd5c332e2a6be0
push id110231
push userbmo:tom@mozilla.com
push dateThu, 17 May 2018 15:54:15 +0000
reviewersbobowen
bugs1462100
milestone62.0a1
Bug 1462100 Cast to void* to avoid conversion errors on MinGW, which does not do the automatic conversion like msvc r?bobowen MozReview-Commit-ID: 8fO9Nu9gaxh
security/sandbox/chromium/sandbox/win/src/interception.h
--- a/security/sandbox/chromium/sandbox/win/src/interception.h
+++ b/security/sandbox/chromium/sandbox/win/src/interception.h
@@ -264,25 +264,25 @@ class InterceptionManager {
 #define MAKE_SERVICE_NAME(service) &Target##service##64
 #else
 #define MAKE_SERVICE_NAME(service) &Target##service
 #endif
 
 #define ADD_NT_INTERCEPTION(service, id, num_params) \
   AddToPatchedFunctions(kNtdllName, #service, \
                         sandbox::INTERCEPTION_SERVICE_CALL, \
-                        MAKE_SERVICE_NAME(service), id)
+                        (void*)MAKE_SERVICE_NAME(service), id)
 
 #define INTERCEPT_NT(manager, service, id, num_params) \
   manager->ADD_NT_INTERCEPTION(service, id, num_params)
 
 // When intercepting the EAT it is important that the patched version of the
 // function not call any functions imported from system libraries unless
 // |TargetServices::InitCalled()| returns true, because it is only then that
 // we are guaranteed that our IAT has been initialized.
 #define INTERCEPT_EAT(manager, dll, function, id, num_params) \
   manager->AddToPatchedFunctions(dll, #function, sandbox::INTERCEPTION_EAT, \
-                                 MAKE_SERVICE_NAME(function), id)
+                                 (void*)MAKE_SERVICE_NAME(function), id)
 #endif  // SANDBOX_EXPORTS
 
 }  // namespace sandbox
 
 #endif  // SANDBOX_SRC_INTERCEPTION_H_