Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCzdS-00Ezk6-5K for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Nov 2024 11:09:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.94.2) (envelope-from ) id 1tCzdP-004X14-Ju for pgsql-hackers@arkaria.postgresql.org; Mon, 18 Nov 2024 11:09:36 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCzdP-004X0v-9D for pgsql-hackers@lists.postgresql.org; Mon, 18 Nov 2024 11:09:35 +0000 Received: from fhigh-b6-smtp.messagingengine.com ([202.12.124.157]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1tCzdJ-002VPA-KJ for pgsql-hackers@postgresql.org; Mon, 18 Nov 2024 11:09:34 +0000 Received: from phl-compute-07.internal (phl-compute-07.phl.internal [10.202.2.47]) by mailfhigh.stl.internal (Postfix) with ESMTP id 4F4B7254017E; Mon, 18 Nov 2024 06:09:28 -0500 (EST) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-07.internal (MEProxy); Mon, 18 Nov 2024 06:09:28 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eisentraut.org; h=cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:subject:subject:to:to; s=fm2; t=1731928168; x=1732014568; bh=Q7tsgzIQ/X8MDDiNOvka65XqJyTYmWgnt30+vzX27MA=; b= ZGYpG5gHQAH54d+HGm/2tsZe/0eMQriFO4eiMGVmfMdNNKjv3H9TBcpWetowuAde r6cHFosuVbeGiTSmRxRH7CZyXOsXG7d5SJfA6bNrZLuWcKXyTt7UE1BS+PkUcZb/ 5Qne7KozWVmUDB8xgZnPu1ZjDIgUorjD+Ctl4XbwgYt2tkPsuy72mQvfZVAbI8NL Eus1Y5VPCKYxmBRtoXYyAMYe37iELMm1Fbze6Qd2MDGnoxWDhcz06wDcJjxcqibp 4dlH6PjqkKqeWqXVnH2mIRwHcEi4/spPwZuIWATrBYdBgApAbRFnIkESUQdJU9iy Zx4JrsKgg1Lxobd1AH85+A== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-sender :x-me-sender:x-sasl-enc; s=fm3; t=1731928168; x=1732014568; bh=Q 7tsgzIQ/X8MDDiNOvka65XqJyTYmWgnt30+vzX27MA=; b=LppLaOFDll4Ad93K+ ffCNamXd8/XcWyEhrVZVuauAPgyiXuOpi0JtcnRtK3WLg9XUgNqQf5H/MfNdyx5w K9ZwYELAbW2Lt2MjHJu3UQlUr5jmrbUmptuk+Qn8KV9blk9wR3dx099qtezKn431 Um8cl8NePCMdLb2K97Mie3Ol3OXSOW0A4cmLONhCMBfkURF0WeAOwc1Sb7kytvlT 7UiD65myZ6mGX7199gBOF/YQr5MV42k67sr7nCgLKnU3QEs5aQkmstYBj8/ei16c pcXAMMjmWXeXsGDNIL3M+adWBUoHcJsQcD6G8u5kE7mQZTidCc4BIf4UnrbAHp1E Ftgag== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeefuddrfedtgddvgecutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpggftfghnshhusghstghrihgsvgdpuffr tefokffrpgfnqfghnecuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnth hsucdlqddutddtmdenucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtvdejnecu hfhrohhmpefrvghtvghrucfgihhsvghnthhrrghuthcuoehpvghtvghrsegvihhsvghnth hrrghuthdrohhrgheqnecuggftrfgrthhtvghrnhepffdutedtveegheeiueeifeegteel heeufedvgedvheevheejvdefveekkefhleejnecuffhomhgrihhnpegtihhrrhhushdqtg hirdgtohhmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhho mhepphgvthgvrhesvghishgvnhhtrhgruhhtrdhorhhgpdhnsggprhgtphhtthhopedvpd hmohguvgepshhmthhpohhuthdprhgtphhtthhopegrnhgurhgvshesrghnrghrrgiivghl rdguvgdprhgtphhtthhopehpghhsqhhlqdhhrggtkhgvrhhssehpohhsthhgrhgvshhqlh drohhrgh X-ME-Proxy: Feedback-ID: ie0a040ee:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Mon, 18 Nov 2024 06:09:27 -0500 (EST) Message-ID: Date: Mon, 18 Nov 2024 12:09:26 +0100 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: CI CompilerWarnings test fails on 15 in mingw_cross_warning To: Andres Freund , pgsql-hackers@postgresql.org References: Content-Language: en-US From: Peter Eisentraut In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On 17.11.24 02:59, Andres Freund wrote: > Hi, > > See https://cirrus-ci.com/task/5880116075560960 > > [18:14:04.821] time make -s -j${BUILD_JOBS} world-bin > [18:15:49.090] pg_locale.c: In function ‘get_collation_actual_version’: > [18:15:49.090] pg_locale.c:1763:42: error: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘long unsigned int’ [-Werror=format=] > [18:15:49.090] 1763 | collversion = psprintf("%d.%d,%d.%d", > [18:15:49.090] | ~^ > [18:15:49.090] | | > [18:15:49.090] | int > [18:15:49.090] | %ld > [18:15:49.090] 1764 | (version.dwNLSVersion >> 8) & 0xFFFF, > [18:15:49.090] | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > [18:15:49.090] | | > [18:15:49.090] | long unsigned int > > I have no idea why we are seeing this error now when we didn't in the past - > there don't seem to have been any relevant changes? > > It does reproduce on my debian sid machine, so it's something we ought to fix, > I think? > > We did fix it in newer versions: > > Author: Peter Eisentraut > Branch: master Release: REL_16_BR [a9bc04b21] 2023-03-24 07:21:40 +0100 > > Fix incorrect format placeholders > > The fields of NLSVERSIONINFOEX are of type DWORD, which is unsigned > long, so the results of the computations being printed are also of > type unsigned long. > > Peter, any reason you didn't backpatch that? The more interesting patch is 495ed0ef2d7, which did - collversion = psprintf("%d.%d,%d.%d", + collversion = psprintf("%ld.%ld,%ld.%ld", whereas my patch just did - collversion = psprintf("%ld.%ld,%ld.%ld", + collversion = psprintf("%lu.%lu,%lu.%lu", The former change was part of a larger patch, so it was not a candidate for backpatching. As to why it's happening now, the code in question is guarded by #elif defined(WIN32) && _WIN32_WINNT >= 0x0600 so if it didn't happen before, maybe the _WIN32_WINNT value changed.