Silence Borland compiler warnings in XS::APItest and Win32
Steve Hay [Tue, 29 Aug 2006 13:24:56 +0000 (13:24 +0000)]
(See: http://www.nntp.perl.org/group/perl.daily-build.reports/40471)

p4raw-id: //depot/perl@28768

ext/XS/APItest/APItest.xs
win32/ext/Win32/Win32.pm
win32/ext/Win32/Win32.xs

index 0c5c517..d83e32f 100644 (file)
@@ -30,7 +30,7 @@ my_cxt_setint_p(pMY_CXT_ int i)
 }
 
 SV*
-my_cxt_getsv_interp()
+my_cxt_getsv_interp(void)
 {
 #ifdef PERL_IMPLICIT_CONTEXT
     dTHX;
index e55bfee..e35efc9 100644 (file)
@@ -8,7 +8,7 @@ BEGIN {
     require DynaLoader;
 
     @ISA = qw|Exporter DynaLoader|;
-    $VERSION = '0.2601';
+    $VERSION = '0.2601_01';
 
     @EXPORT = qw(
        NULL
index 3e502b1..b92ae65 100644 (file)
@@ -8,6 +8,8 @@
 
 typedef BOOL (WINAPI *PFNSHGetSpecialFolderPath)(HWND, char*, int, BOOL);
 typedef HRESULT (WINAPI *PFNSHGetFolderPath)(HWND, int, HANDLE, DWORD, LPTSTR);
+typedef int (__stdcall *PFNDllRegisterServer)(void);
+typedef int (__stdcall *PFNDllUnregisterServer)(void);
 #ifndef CSIDL_FLAG_CREATE
 #   define CSIDL_FLAG_CREATE               0x8000
 #endif
@@ -357,14 +359,14 @@ XS(w32_RegisterServer)
     dXSARGS;
     BOOL result = FALSE;
     HINSTANCE hnd;
-    FARPROC func;
 
     if (items != 1)
        croak("usage: Win32::RegisterServer($libname)\n");
 
     hnd = LoadLibraryA(SvPV_nolen(ST(0)));
     if (hnd) {
-       func = GetProcAddress(hnd, "DllRegisterServer");
+       PFNDllRegisterServer func;
+       func = (PFNDllRegisterServer)GetProcAddress(hnd, "DllRegisterServer");
        if (func && func() == 0)
            result = TRUE;
        FreeLibrary(hnd);
@@ -378,14 +380,14 @@ XS(w32_UnregisterServer)
     dXSARGS;
     BOOL result = FALSE;
     HINSTANCE hnd;
-    FARPROC func;
 
     if (items != 1)
        croak("usage: Win32::UnregisterServer($libname)\n");
 
     hnd = LoadLibraryA(SvPV_nolen(ST(0)));
     if (hnd) {
-       func = GetProcAddress(hnd, "DllUnregisterServer");
+       PFNDllUnregisterServer func;
+       func = (PFNDllUnregisterServer)GetProcAddress(hnd, "DllUnregisterServer");
        if (func && func() == 0)
            result = TRUE;
        FreeLibrary(hnd);