Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nX7zg-0002Cv-ND for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2022 20:54:12 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1nX7zf-0007Ta-L7 for pgsql-hackers@arkaria.postgresql.org; Wed, 23 Mar 2022 20:54:11 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nX7z0-0002SE-H7 for pgsql-hackers@lists.postgresql.org; Wed, 23 Mar 2022 20:53:30 +0000 Received: from wout4-smtp.messagingengine.com ([64.147.123.20]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nX7yv-0004pl-KC for pgsql-hackers@postgresql.org; Wed, 23 Mar 2022 20:53:30 +0000 Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.west.internal (Postfix) with ESMTP id 52CCE3201EE4; Wed, 23 Mar 2022 16:53:23 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Wed, 23 Mar 2022 16:53:23 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm3; bh=n/TlbYZ6aa8getE6cvjEVEdZTtxiYIrEVka+Nv5Rh LE=; b=cnBQPAwH+8exIfzXPwJBUV2+8hgqxlyfoZXDJPLrIsZXnwqrr7sk3i9fS EXEdDlg/gWhTkWIiimwH2BZhV3FPtfO5MNmiTEQIOeMykrvmEmwkQQ8//X7n3dsw KYwIGnYDN6n6ecxVB62n62bRymgeuojSc6ohO8W1bYCzkSdfxNbdHJ2JG+pvqn7v 0ROVBT10JcpQWn/YQZLYyjHljpJjkooH32/OgwBgZRF9//yEUbJV9A/Y+8AmiCIN LbGNJ06DTsZRbktL7oSaeLoIzeqHifJloHwovagInQOFqfYUrWK8vzH4l0gNwNGZ hu6uZQm8nouG8ndi6WnkZ7fhoevCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrudegjedgudegvdcutefuodetggdotefrod ftvfcurfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfgh necuuegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmd enucfjughrpefkffggfgfuvfhfhfgjtgfgsehtkeertddtfeejnecuhfhrohhmpefrvght vghrucfgihhsvghnthhrrghuthcuoehpvghtvghrrdgvihhsvghnthhrrghuthesvghnth gvrhhprhhishgvuggsrdgtohhmqeenucggtffrrghtthgvrhhnpeelgfetfeeitdelleeg geejvefhueetfedvtdejheevueeifeegvdfhueeludetueenucevlhhushhtvghrufhiii gvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehpvghtvghrrdgvihhsvghnthhrrghu thesvghnthgvrhhprhhishgvuggsrdgtohhm X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 23 Mar 2022 16:53:22 -0400 (EDT) Message-ID: Date: Wed, 23 Mar 2022 21:53:21 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 Subject: Re: [PATCH] add relation and block-level filtering to pg_waldump Content-Language: en-US To: Thomas Munro , David Christensen Cc: Bharath Rupireddy , PostgreSQL-development References: 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 21.03.22 05:55, Thomas Munro wrote: > [04:30:50.630] pg_waldump.c:963:26: error: format ‘%u’ expects > argument of type ‘unsigned int *’, but argument 3 has type ‘ForkNumber > *’ [-Werror=format=] > [04:30:50.630] 963 | if (sscanf(optarg, "%u", > &config.filter_by_relation_forknum) != 1 || > [04:30:50.630] | ~^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > [04:30:50.630] | | | > [04:30:50.630] | | ForkNumber * > [04:30:50.630] | unsigned int * > > And now that this gets to the CompilerWarnings CI task, it looks like > GCC doesn't like an enum as a scanf %u destination (I didn't see that > warning locally when I compiled the above fixup because clearly Clang > is cool with it...). Probably needs a temporary unsigned int to > sscanf into first. That's because ForkNum is a signed type. You will probably succeed if you use "%d" instead.