emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Patch for warnings in 64bit Windows builds


From: Andy Moreton
Subject: Re: Patch for warnings in 64bit Windows builds
Date: Thu, 30 Jul 2015 22:09:51 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt)

On Tue 28 Jul 2015, Eli Zaretskii wrote:

>> From: Andy Moreton <address@hidden>
>> Date: Tue, 28 Jul 2015 12:57:42 +0100
>> 
>> The 64bit Windows builds have shown a few warnings for some time:
>> 
>> ../../src/w32proc.c: In function 'w32_compare_strings':
>> ../../src/w32proc.c:3526:20: warning: assignment from incompatible pointer 
>> type [-Wincompatible-pointer-types]
>>     pCompareStringW = GetProcAddress (LoadLibrary ("Unicows.dll"),
>>                     ^
>> ../../src/w32fns.c: In function 'Ffile_system_info':
>> ../../src/w32fns.c:7827:9: warning: initialization from incompatible pointer 
>> type [-Wincompatible-pointer-types]
>>        = GetProcAddress (hKernel, "GetDiskFreeSpaceExW");
>>          ^
>> ../../src/w32fns.c:7830:9: warning: initialization from incompatible pointer 
>> type [-Wincompatible-pointer-types]
>>        = GetProcAddress (hKernel, "GetDiskFreeSpaceExA");
>>          ^
>> The following patch builds cleanly on:
>>   - 32bit mingw
>>   - 32bit mingw --with-wide-int
>>   - 64bit mingw64
>
> Thanks, pushed.

I've noticed some other warnings in the 64bit mingw64 builds requiring
a similar fix:

../../src/w32.c: In function 'maybe_load_unicows_dll':
../../src/w32.c:9174:25: warning: assignment from incompatible pointer type 
[-Wincompatible-pointer-types]
    pMultiByteToWideChar = GetProcAddress (ret, "MultiByteToWideChar");
                         ^
../../src/w32.c:9175:25: warning: assignment from incompatible pointer type 
[-Wincompatible-pointer-types]
    pWideCharToMultiByte = GetProcAddress (ret, "WideCharToMultiByte");
                         ^

There is also a warning about socket handling:

../../src/w32.c: In function 'sys_socket':
../../src/w32.c:7336:14: warning: overflow in implicit constant conversion 
[-Woverflow]
       return INVALID_SOCKET;
              ^
c:/msys64/mingw64/x86_64-w64-mingw32/include/psdk_inc/_socket_types.h
contains:

        #if 1
        typedef UINT_PTR        SOCKET;
        #else
        typedef INT_PTR         SOCKET;
        #endif

        #define INVALID_SOCKET  (SOCKET)(~0)

Thus it is corect to warn about a conversion from unsigned 64bit to a
signed 32bit value.

>> I don't have copyright paperwork on file, so please let me know if that
>> is required.
>
> Not needed, but you are encouraged to start the paperwork rolling, so
> it will be ready for your next contribution.

Where do I find the appropriate forms ?

    AndyM




reply via email to

[Prev in Thread] Current Thread [Next in Thread]