From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Moreton Newsgroups: gmane.emacs.devel Subject: Re: Patch for warnings in 64bit Windows builds Date: Thu, 30 Jul 2015 22:09:51 +0100 Message-ID: <86y4hxl5cw.fsf@gmail.com> References: <83io94xuwx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1438290635 17626 80.91.229.3 (30 Jul 2015 21:10:35 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 30 Jul 2015 21:10:35 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Jul 30 23:10:20 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1ZKv5n-00037l-RL for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 23:10:19 +0200 Original-Received: from localhost ([::1]:41967 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKv5n-0002JW-1r for ged-emacs-devel@m.gmane.org; Thu, 30 Jul 2015 17:10:19 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:50030) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKv5a-0002FX-MR for emacs-devel@gnu.org; Thu, 30 Jul 2015 17:10:07 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZKv5W-0007gj-83 for emacs-devel@gnu.org; Thu, 30 Jul 2015 17:10:06 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:51024) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZKv5W-0007eL-1o for emacs-devel@gnu.org; Thu, 30 Jul 2015 17:10:02 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1ZKv5U-0002t5-2l for emacs-devel@gnu.org; Thu, 30 Jul 2015 23:10:00 +0200 Original-Received: from 82-69-64-228.dsl.in-addr.zen.co.uk ([82.69.64.228]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2015 23:10:00 +0200 Original-Received: from andrewjmoreton by 82-69-64-228.dsl.in-addr.zen.co.uk with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 30 Jul 2015 23:10:00 +0200 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 65 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: 82-69-64-228.dsl.in-addr.zen.co.uk User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (windows-nt) Cancel-Lock: sha1:8ewofU/wwUVs9BBt2Xper36EubM= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:188207 Archived-At: On Tue 28 Jul 2015, Eli Zaretskii wrote: >> From: Andy Moreton >> 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