Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cy041-0002V0-1y for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 17:58:49 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cy040-0005Mw-L2 for pgsql-hackers@arkaria.postgresql.org; Tue, 11 Apr 2017 17:58:48 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cy02T-000062-Ph for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 17:57:13 +0000 Received: from mail-qt0-x233.google.com ([2607:f8b0:400d:c0d::233]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1cy02R-0008CK-FN for pgsql-hackers@postgresql.org; Tue, 11 Apr 2017 17:57:12 +0000 Received: by mail-qt0-x233.google.com with SMTP id n46so4119077qta.2 for ; Tue, 11 Apr 2017 10:57:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=2ndquadrant-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :content-transfer-encoding:in-reply-to:user-agent; bh=009OjQXzOwu6iRegElBe24BuF6HZMOvSXMUi+VAtUBk=; b=lbDhbc8is9O1u0FjxJ9juNAorZgCsg5h5aw/ZU9EptfbhvmQGYGd+AkjnLFfxpi1H4 mVXRYGjepfBeX2D5MWhVnoUJQWjjN9kqxCJ2gMdkfjIz2ImrGDodNAxImH0c9WMyTubq mEp1c1D2B33EJn5pDHzzcpHqzTkMh0pc0eYapBAWEwtdxnE9A1u+7O6hofrdLk++XBki evJBBGqdZX51kpkrYPS9Yo0vjtA2upFWZ2rzlr2mILj8WWiPrHZAMVWkEzAztlsSBYRh OWVAIZ9ecbiZBwANj7ShVx3XZscJgOHylGnPUik/7P42hRIKT30uhxpqUWEiravLJvhA qXEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=009OjQXzOwu6iRegElBe24BuF6HZMOvSXMUi+VAtUBk=; b=C1/I8hEeU6w7hxJtjgj3jMfZiRhzfp0ZyktMxMxU5bfTs8wZkEMiqpYEC0YOtX4I9V rw1Jv2WwOoHlNYn+IZCRihI8FRi6vjFfreQhUE7iexdFHdGe3kGtYoOpFVPlkRMSIRH5 1SyysT0Wh3ZfBKJrMH8TrTvnWCcKQenDZ+ROcEkesFx3J+Ln6zCOh7bPLtos914+IcHY FS6YQrmTinmX77RA5P8Q50iqXjNK8A4W7kblFRJr6pqqe7H1BRRKkdM2q8IZyEDfubBZ yiRGc9VXOHBaWVviKQ+qVccVVOXIXzKuvgAehuCEAgRnhA0P/bJgfwMHaGp6CGkEsb8M 5mLg== X-Gm-Message-State: AN3rC/7RHNg+3BYeYjOzSHQn4lJHaSV6kNL/9pQ+0XW3yXc0tXki53SoVODCSeboKLAfgQkh X-Received: by 10.200.54.136 with SMTP id a8mr18737995qtc.87.1491933430240; Tue, 11 Apr 2017 10:57:10 -0700 (PDT) Received: from alvin.alvh.no-ip.org ([190.13.189.98]) by smtp.gmail.com with ESMTPSA id d142sm11493029qkc.32.2017.04.11.10.57.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 11 Apr 2017 10:57:09 -0700 (PDT) Received: by alvin.alvh.no-ip.org (Postfix, from userid 1000) id 4013A626; Tue, 11 Apr 2017 14:57:08 -0300 (-03) Date: Tue, 11 Apr 2017 14:57:08 -0300 From: Alvaro Herrera To: Tom Lane Cc: Peter Eisentraut , pgsql-hackers Subject: Re: GCC 7 warnings Message-ID: <20170411175708.coshtfzejgaqhar2@alvherre.pgsql> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <14447.1491841559@sss.pgh.pa.us> User-Agent: NeoMutt/20170206-195-7adf12 (1.7.2) X-Pg-Spam-Score: -1.9 (-) 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 Tom Lane wrote: > Peter Eisentraut writes: > > d) Replace most of the problematic code with psprintf() and dynamically > > sized buffers. > > +1 for (c) as you have it. Later we might think about selectively > doing (d), but it seems like more work for probably not much benefit. Yeah -- also it's possible some of these code paths must not attempt to palloc() for robustness reasons. I would go for c) only for now, and only try d) for very specific cases where there are no such concerns. -- Álvaro Herrera https://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers