Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBkKI-0007CY-1D for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2016 15:28:10 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cBkKH-0007Fq-KC for pgsql-hackers@arkaria.postgresql.org; Tue, 29 Nov 2016 15:28:09 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cBkIr-0004NW-O2 for pgsql-hackers@postgresql.org; Tue, 29 Nov 2016 15:26:41 +0000 Received: from tamriel.snowman.net ([72.66.115.51]) by magus.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cBkIp-0005jR-9A for pgsql-hackers@postgresql.org; Tue, 29 Nov 2016 15:26:41 +0000 Received: by tamriel.snowman.net (Postfix, from userid 1000) id 6C7055F7A0; Tue, 29 Nov 2016 10:25:38 -0500 (EST) Date: Tue, 29 Nov 2016 10:25:38 -0500 From: Stephen Frost To: pgsql-hackers@postgresql.org Subject: Re: Compiler warnings Message-ID: <20161129152538.GS13284@tamriel.snowman.net> References: <20161129152102.GR13284@tamriel.snowman.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="YlOmdgDTFxtsaaW3" Content-Disposition: inline In-Reply-To: <20161129152102.GR13284@tamriel.snowman.net> X-Editor: Vim http://www.vim.org/ X-Info: http://www.snowman.net X-Operating-System: Linux/3.13.0-91-generic (x86_64) X-Uptime: 10:23:57 up 143 days, 16:48, 25 users, load average: 0.63, 0.28, 0.19 User-Agent: Mutt/1.5.21 (2010-09-15) X-Pg-Spam-Score: -4.8 (----) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-hackers Precedence: bulk Sender: pgsql-hackers-owner@postgresql.org --YlOmdgDTFxtsaaW3 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable * Stephen Frost (sfrost@snowman.net) wrote: > diff --git a/src/backend/utils/cache/plancache.c b/src/backend/utils/cach= e/plancache.c > new file mode 100644 > index 884cdab..b5d97c8 > *** a/src/backend/utils/cache/plancache.c > --- b/src/backend/utils/cache/plancache.c > *************** GetCachedPlan(CachedPlanSource *plansour > *** 1196,1204 **** > */ > qlist =3D NIL; > } > ! } > !=20 > ! if (customplan) > { > /* Build a custom plan */ > plan =3D BuildCachedPlan(plansource, qlist, boundParams); > --- 1196,1203 ---- > */ > qlist =3D NIL; > } > ! }=20 > ! else > { > /* Build a custom plan */ > plan =3D BuildCachedPlan(plansource, qlist, boundParams); Meh, of course this isn't correct since we could change 'customplan' inside the first if() block to be true, the right answer is really to just do: CachedPlan *plan =3D NULL; at the top and keep it simple. ENEEDMORECOFFEE. Thanks! Stephen --YlOmdgDTFxtsaaW3 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1 iQIcBAEBCgAGBQJYPZ3yAAoJEO1sijiDR2RV5SQP/jtmxqZ+sHlw4diyarLauXtu tDUanhRpYOsHhzHcf6WqfvtDs71N2bh3f/eEQZ+kZq1FcYr12UXAMYu7ZJwAZy9k qgFIAgG0iR3ZZIONgxQCqXdATzYBrJahPnAQRaPkc+e0SvdNAFJDnnIJFxMvnyMC tUdXHRLZemos0Y6nSGkLKhKedHkXCY0zLDUn45vltTV0M38a9bSwNI9Zf5G72kEY ELQwsKabPyIA+YsP35N82dvoJ1OOILmMRGesaql1H0Aedzsl8x6HN4cHYNQZQ8JU 9HCP28WY+7/v4eEdCnramy048dKph/8TKcdpFhNd7cQAjiUwvMTB78185GBDsvd+ 4B2gh+2YIs+xe4CJUAuTeSptxz1GpoUDHavHDzmFyeGEFMaJ7ef15sBmcpJUX+xF O/K3kbT827HHaG6MNA01D/SikvJKRwC88T8zvrde2XxrlVY8NJsf5AGjEVnAuBEg +/uCzQJnsZhphVF+fjkdMv2XJ5B9cQu9UggfBT/1NMqDWE0PWkbt939ZsunSqsRz T7Jj5cSr+ZYMExmUDMqKL7YwN8Pj3gtBDznaXA1d5WSv799C98ZWZNtZNg7992R0 pbSha11pBFB/+dQdQdmyHc8pYuz3VyW+sykwQ7zizpMDeA8+/k7x8GAAGPfCRbaT HjflNF5VyeCiiSWAxcvP =ErWV -----END PGP SIGNATURE----- --YlOmdgDTFxtsaaW3--