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 1sTPHq-00FwYC-3C for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 17:14:54 +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 1sTPHo-00BkfV-R8 for pgsql-hackers@arkaria.postgresql.org; Mon, 15 Jul 2024 17:14:52 +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 1sTPHo-00BkfM-HI for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 17:14:52 +0000 Received: from mail-io1-xd2c.google.com ([2607:f8b0:4864:20::d2c]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.94.2) (envelope-from ) id 1sTPHm-002CGE-1q for pgsql-hackers@lists.postgresql.org; Mon, 15 Jul 2024 17:14:51 +0000 Received: by mail-io1-xd2c.google.com with SMTP id ca18e2360f4ac-7fd3dbc01deso212604339f.0 for ; Mon, 15 Jul 2024 10:14:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1721063689; x=1721668489; darn=lists.postgresql.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=9mcbtBZ9ZECIld1Q2MWLsXNnjERZM23JytQXQGCKBD0=; b=BrXaATw+NyFTKOIuPLdRHNC6k4IgJeIYgaapVMbFKeLm7645vO/XcUQ/zbyqui75ly s1CQSDbectS29wilR25HmVO2yCKOkjvTWnOaoVz4T+TCrvbYNq17IlaBnM9gspBe1nUx TRL6jFT4QCcF8rmJeAye8tl59qQEuGnNkcDCgmIEHlU5yie3FV3KFesuHSj75R7x+Q0x GWR97YFZ+roJIikRu51S2GXfJ7x/kG7UFOdRytuMx+n/3ql2ilpE/z0scjZEAugHwUK1 CJMt+p3/MieJbheUMglJb3Uhz5IuAjrX2p0Zrutn6h2VN2bkBbPd0UjqnZETVi96qYkm EvHQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1721063689; x=1721668489; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=9mcbtBZ9ZECIld1Q2MWLsXNnjERZM23JytQXQGCKBD0=; b=j6ZMyELaT0SRbsKgHcLAQO6TA6dN+TfQRbcX9fSeK+kjItKSEnzN4l2mOy4qnFoXYR AZinJ4DWT5vYe3sd63VCY+S7yhYySiNkK/HVwSfk/5nrYxA0UcmJe02CdkayCG0V3rLL FtQdQ6LtefKyLSIkXrcsr/hocIUZg6kyuOQHiYEqptoLy6eASOZo0kKtw7Cjs9r7+cBc 609RaUX8+qsEVwC3tfhh5QjCYk6JzY0bGs//3pB9CufCYpgWSylp/9rYwaFkxo/MBqmz LVGobN60l+hCf4P/G4qjlLO6h7XVfovw2dmYXFXUYOd1IJJfJjkAxEnp/dtsRQChinzc +iZg== X-Forwarded-Encrypted: i=1; AJvYcCW+h69yJPjZaXIWIwOTGaNHJdOG1iNss8S45HJxGUfOX7p5F/I4Ea4cuNs1B0I5Pnp4EoQySwxLq5ZByAnRzbb+A06sWtKM0ToeRYEuEx75vkCt X-Gm-Message-State: AOJu0YzlABmPX/OxGgK7UaFR/XA+zi5IKy6usYpazvM0xqNPW6Bfo1C+ NaWmHWtTylWvHtSAlA85FBkNerCtEYmhjRQnb8AmgzmJP5rjkb2V X-Google-Smtp-Source: AGHT+IFNHZZupg2ukilkdQinblOcU7/RWT1VIGx3VXaCmA0MjO3EBiyE5LjfDyN2sFlfkmNon0OKZg== X-Received: by 2002:a05:6602:29cf:b0:803:bbc6:3224 with SMTP id ca18e2360f4ac-815470b6ab8mr45161239f.16.1721063689365; Mon, 15 Jul 2024 10:14:49 -0700 (PDT) Received: from nathan (162-195-168-172.lightspeed.stlsmo.sbcglobal.net. [162.195.168.172]) by smtp.gmail.com with ESMTPSA id 8926c6da1cb9f-4c1e1c03832sm1314306173.108.2024.07.15.10.14.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 15 Jul 2024 10:14:48 -0700 (PDT) Date: Mon, 15 Jul 2024 12:14:47 -0500 From: Nathan Bossart To: Andres Freund Cc: Nazir Bilal Yavuz , Tom Lane , Erik Rijkers , pgsql-hackers@lists.postgresql.org, Thomas Munro Subject: Re: gcc 12.1.0 warning Message-ID: References: <20240413022547.yhhr6r4pgwpnx7w3@awork3.anarazel.de> <20240423165939.7tm2lthmuofzmcdq@awork3.anarazel.de> <20240715164155.7blp2h6j4spc2ha4@awork3.anarazel.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240715164155.7blp2h6j4spc2ha4@awork3.anarazel.de> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Jul 15, 2024 at 09:41:55AM -0700, Andres Freund wrote: > On 2024-05-10 12:13:21 +0300, Nazir Bilal Yavuz wrote: >> The fix is attached. It cleanly applies from REL_15_STABLE to >> REL_12_STABLE, fixes the warnings and the tests pass. > > Thanks! I've applied it to all branches - while it's not required to avoid a > warning in newer versions, it's still not correct as it was... nitpick: pgindent thinks one of the spaces is unnecessary. diff --git a/src/backend/utils/misc/guc.c b/src/backend/utils/misc/guc.c index a043d529ef..b0947a4cf1 100644 --- a/src/backend/utils/misc/guc.c +++ b/src/backend/utils/misc/guc.c @@ -1289,8 +1289,8 @@ find_option(const char *name, bool create_placeholders, bool skip_errors, static int guc_var_compare(const void *a, const void *b) { - const char *namea = **(const char ** const *) a; - const char *nameb = **(const char ** const *) b; + const char *namea = **(const char **const *) a; + const char *nameb = **(const char **const *) b; return guc_name_compare(namea, nameb); } -- nathan