shithub: sox

Download patch

ref: b65321743c9cb9e5a9db415d314fce83464aa199
parent: 8b53a74394793340a26e00dbde207b0d3028364e
author: idigdoug <idigdoug>
date: Sat Jan 2 06:07:33 EST 2010

Fix some warnings in win32-ltdl.c when compiled under GCC.

--- a/src/win32-ltdl.c
+++ b/src/win32-ltdl.c
@@ -36,7 +36,7 @@
     const char* szSource,
     char* szDest,
     unsigned cchDest,
-    char chStop)
+    int chStop)
 {
     unsigned i = 0;
     char ch;
@@ -128,7 +128,7 @@
     int cErrors = 0;
     unsigned iSearchPath = 0;
     unsigned iOnePath;
-    unsigned iExePath;
+    unsigned iExePath = 0;
     unsigned cchCopied;
     HANDLE hFind;
     WIN32_FIND_DATAA data;
@@ -290,9 +290,10 @@
     lt_dlhandle hModule,
     const char *szSymbolName)
 {
-    lt_ptr pf = (lt_ptr)GetProcAddress((HMODULE)hModule, szSymbolName);
-    s_dwLastError = pf ? 0 : GetLastError();
-    return pf;
+    union {FARPROC fn; lt_ptr ptr;} func;
+    func.fn = GetProcAddress((HMODULE)hModule, szSymbolName);
+    s_dwLastError = func.fn ? 0 : GetLastError();
+    return func.ptr;
 }
 
 const char *