From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Yuri Khan Newsgroups: gmane.emacs.devel Subject: Re: MS-Windows warnings (was build failure) for Emacs master Date: Wed, 13 Apr 2016 11:49:39 +0600 Message-ID: References: <56CCD91E.6070507@alice.it> <83egc2ixji.fsf@gnu.org> <56CD798D.7060102@alice.it> <56CD8408.1000701@alice.it> <83wppuggb4.fsf@gnu.org> <56CE2CA7.5050906@alice.it> <83io1cg2pt.fsf@gnu.org> <56DA0327.2030009@alice.it> <83oaatxu72.fsf@gnu.org> <570C4307.6050907@alice.it> <87k2k3t5xb.fsf@russet.org.uk> <570D6093.8010305@alice.it> <570D7C3B.90206@cs.ucla.edu> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1460526607 4227 80.91.229.3 (13 Apr 2016 05:50:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 13 Apr 2016 05:50:07 +0000 (UTC) Cc: Emacs developers , Angelo Graziosi To: Paul Eggert Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Apr 13 07:50:06 2016 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 1aqDgk-0000xb-KO for ged-emacs-devel@m.gmane.org; Wed, 13 Apr 2016 07:50:06 +0200 Original-Received: from localhost ([::1]:36283 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqDgj-0000la-Pt for ged-emacs-devel@m.gmane.org; Wed, 13 Apr 2016 01:50:05 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:60888) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqDgg-0000jK-CJ for emacs-devel@gnu.org; Wed, 13 Apr 2016 01:50:03 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aqDgf-0000iz-27 for emacs-devel@gnu.org; Wed, 13 Apr 2016 01:50:02 -0400 Original-Received: from mail-lf0-x22c.google.com ([2a00:1450:4010:c07::22c]:36300) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aqDge-0000it-QS for emacs-devel@gnu.org; Wed, 13 Apr 2016 01:50:00 -0400 Original-Received: by mail-lf0-x22c.google.com with SMTP id g184so54696484lfb.3 for ; Tue, 12 Apr 2016 22:50:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc:content-transfer-encoding; bh=fQRguBH6V+ZDFtLoyszZTIP2pS8vy3ofEZdXugxbcOg=; b=bb/S3s+DNHpHEZd+Em24RAdojWShHHakPJAWXe6dS7D968qT8/LgC8Gkd5tqfeMZWw KGU2yr3iCuVrC6SggWGBjSdm8Mauo8NvGw0vf9Hw3YRMobkgbKoSTcXAWxvMpV/CxbHo KrryrcaibKJYaruXRMnZ55s/KCkevYS3VUv6csoEpJTSRVeizylGceL0nL9pKzMK++sS TfUP6ExW3t6f4BC1649tU/q6PMulH+QjAQd4AeDPBGRHMwpwrZKks4J0EgYLKuPrdmbd BsBXeeclYMIGmxVOdGwdFKOxX+UpW8Z5XH8IP7zZRqfROKedIM9jk0gYa4kc/X9dWjBj gdEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc:content-transfer-encoding; bh=fQRguBH6V+ZDFtLoyszZTIP2pS8vy3ofEZdXugxbcOg=; b=ioKy45AIgVQHlU4rdYnu5qiSUmZGgP/NuPsRt3MDfCDWi8cvHlJE0QicMspmWuOdKX hdHkOoI8GHIGlhkLU/f/nryEOr1Q0Txa1xhBnvFXnP2axsVv2JpmdjLQyT4WmTc8rSrl ZHi2DvigLQbgMFGIm8SLdDSsT3w1MlSxiZfObdmC9gq4bL96aGa3kSPyhm08y6VEoTJG XgwgUkZpSZNiXcdtVHorGOlyJg/xC1YXjpD7guIqz8aEjRfuAWh95JP+Tynznl7gbYfg XfvYqSfs9w3lZrOH7HWPbeUYJb3wLg4+t30YbzsybfoluD4C59n2swtasUvYtiVTcNA8 Q7QA== X-Gm-Message-State: AOPr4FU0gMU5COz663flQWjThiDZSSk6Nlrit/YY2Nl3yYS3j/9HUa/Q+lcUMfRhUBkAJ1LB04o5z+rGUqVwog== X-Received: by 10.112.60.100 with SMTP id g4mr3387582lbr.56.1460526599454; Tue, 12 Apr 2016 22:49:59 -0700 (PDT) Original-Received: by 10.112.172.197 with HTTP; Tue, 12 Apr 2016 22:49:39 -0700 (PDT) In-Reply-To: <570D7C3B.90206@cs.ucla.edu> X-Google-Sender-Auth: G01iPB_5T9tvmon5A0mW3Ef29AU X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:4010:c07::22c X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:202877 Archived-At: On Wed, Apr 13, 2016 at 4:52 AM, Paul Eggert wrote: > On 04/12/2016 01:54 PM, Angelo Graziosi wrote: > >> C:/msys64/tmp/mingw-w64-emacs-git/src/emacs/lib-src/ntlib.c:110:15: >> warning: format '%d' expects argument of type 'int', but argument 2 has = type >> 'DWORD {aka long unsigned int}' [-Wformat=3D] >> >> printf ("Checking parent status failed: %d\n", GetLastError ()); > > For portable code, that would be a valid warning. If GetLastError returns > unsigned long, the format should use %lu, not %d The wider issue here is that GetLastError return values are not even meant for printf=E2=80=99ing. They are for feeding through FormatMessage. > As I understand it, though, MS-Windows defines GetLastError to return > unsigned int on 64-bit machines, and unsigned long on 32-bit machines (!)= . That is, in terms, uint32_t everywhere. > This idiosyncrasy could be handled in the MS-Windows port by something li= ke > this: > > #ifdef __MINGW64__ > # define pDWORD "" > #else > # define pDWORD "l" > #endif Alternatively, use the non-standard %I32u format specification.