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.98.2) (envelope-from ) id 1xABlQ-00000002V7z-2A5u for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Sep 2026 19:39:20 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.98.2) (envelope-from ) id 1xABlP-00000002Rh0-3LFt for pgsql-hackers@arkaria.postgresql.org; Fri, 25 Sep 2026 19:39:19 +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.98.2) (envelope-from ) id 1xABlP-00000002Rgs-29Bi for pgsql-hackers@lists.postgresql.org; Fri, 25 Sep 2026 19:39:19 +0000 Received: from sss.pgh.pa.us ([68.162.161.243]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.98.2) (envelope-from ) id 1xABlM-00000001FNc-3k5E for pgsql-hackers@lists.postgresql.org; Fri, 25 Sep 2026 19:39:18 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.18.1/8.18.1) with ESMTP id 68PJdFMH2084140; Fri, 25 Sep 2026 15:39:15 -0400 From: Tom Lane To: Nathan Bossart cc: pgsql-hackers@lists.postgresql.org Subject: Re: Cleaning up pgcrypto/crypt-des.c to avoid compiler warnings In-reply-to: References: <2005885.1790359097@sss.pgh.pa.us> Comments: In-reply-to Nathan Bossart message dated "Fri, 25 Sep 2026 13:54:58 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <2084138.1790365155.1@sss.pgh.pa.us> Date: Fri, 25 Sep 2026 15:39:15 -0400 Message-ID: <2084139.1790365155@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Nathan Bossart writes: > On Fri, Sep 25, 2026 at 01:58:17PM -0400, Tom Lane wrote: >> I think this odd coding, perhaps combined with all the cowboy casting >> that's going on here, is what's confusing gcc into giving a warning. >> I propose the attached patch to make this code less ugly and (with >> luck) suppress the warning. > Getting rid of the "q" variable altogether might have a better chance of > clearing the warnings, and IMHO it further improves readability: Yeah, I adopted something close to Ayush's variant of that. regards, tom lane