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 1qbnI4-00D2VB-Ge for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Aug 2023 19:25:16 +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 1qbnI2-009Ps3-Fk for pgsql-hackers@arkaria.postgresql.org; Thu, 31 Aug 2023 19:25:14 +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 1qbnI1-009Pro-RW for pgsql-hackers@lists.postgresql.org; Thu, 31 Aug 2023 19:25:13 +0000 Received: from momjian.us ([72.94.173.45]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1qbnHy-0021Li-Hd for pgsql-hackers@postgresql.org; Thu, 31 Aug 2023 19:25:12 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=momjian.us; s=2023062407; h=Content-Type:MIME-Version:Message-ID:Subject:To:From:Date: Sender:Reply-To:Cc:Content-Transfer-Encoding:Content-ID:Content-Description: In-Reply-To:References; bh=3uyal6GBunBnOuZ3KfuSaI4rwBG6bPLCV/SID0uRC5c=; b=IT RPGemJX0r3g2J+P2S5pbWkXDIR85mhYVRWcyEtZ/bCK9HU/89VxqXQTGENgySgGK4MEsY523oeKEj O98QizZcL4usqh9BYCnI7EEmpC2XymOZQ0PYlM0UBMLnmOBFKITFtJxIrh8LPco0Xa9vVE//P4TqX VfM/lSQnZ+jd4gVVCnOK9lcJ9oaGJN7h/dY0lDu0OpHH3UY4gn3JzXHPQcWxnkGJgnan/XVNc81Gu r9jEzLyRQAR64SxLttoY/FY3XJLA/Z3zBfZvZxhTtOR+Jt7x+em0hwsSjCendt5M44pbtlxQYdfzU brQVFpRO7xWCCs/Oxl/4Q0N94MZ9HcGA==; Received: from bruce by momjian.us with local (Exim 4.96) (envelope-from ) id 1qbnHx-00EPZD-1F for pgsql-hackers@postgresql.org; Thu, 31 Aug 2023 15:25:09 -0400 Date: Thu, 31 Aug 2023 15:25:09 -0400 From: Bruce Momjian To: PostgreSQL-development Subject: Suppressing compiler warning on Debian 12/gcc 12.2.0 Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Being a new user of Debian 12/gcc 12.2.0, I wrote the following shell script to conditionally add gmake rules with compiler flags to src/Makefile.custom to suppress warnings for certain files. This allows me to compile all supported Postgres releases without warnings. I actually didn't how simple it was to add per-file compile flags until I read: https://stackoverflow.com/questions/6546162/how-to-add-different-rules-for-specific-files --------------------------------------------------------------------------- # PG 14+ uses configure.ac if [ ! -e configure.in ] || grep -q 'AC_INIT(\[PostgreSQL\], \[13\.' configure.in then cat >> src/Makefile.custom <> src/Makefile.custom < https://momjian.us EDB https://enterprisedb.com Only you can decide what is important to you.