Fix warning about casting result of GetProcAddress.
authorStephen Sinclair <radarsat1@gmail.com>
Thu, 24 Jan 2019 14:12:16 +0000 (15:12 +0100)
committerStephen Sinclair <radarsat1@gmail.com>
Thu, 24 Jan 2019 14:12:16 +0000 (15:12 +0100)
RtAudio.cpp

index 8037d2a886e8645c574cea57fcf0995c15e0e492..9927b260123a7616ed88cb5efb2a7346eaa53ffa 100644 (file)
@@ -4997,7 +4997,8 @@ void RtApiWasapi::wasapiThread()
   HMODULE AvrtDll = LoadLibrary( (LPCTSTR) "AVRT.dll" );
   if ( AvrtDll ) {
     DWORD taskIndex = 0;
-    TAvSetMmThreadCharacteristicsPtr AvSetMmThreadCharacteristicsPtr = ( TAvSetMmThreadCharacteristicsPtr ) GetProcAddress( AvrtDll, "AvSetMmThreadCharacteristicsW" );
+    TAvSetMmThreadCharacteristicsPtr AvSetMmThreadCharacteristicsPtr =
+      ( TAvSetMmThreadCharacteristicsPtr ) (void(*)()) GetProcAddress( AvrtDll, "AvSetMmThreadCharacteristicsW" );
     AvSetMmThreadCharacteristicsPtr( L"Pro Audio", &taskIndex );
     FreeLibrary( AvrtDll );
   }