Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cozyu-0003Ye-2M for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 22:04:20 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1cozyt-0003BC-Le for pgsql-hackers@arkaria.postgresql.org; Fri, 17 Mar 2017 22:04:19 +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 1cozxN-0006ad-Nl for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 22:02:45 +0000 Received: from out1-smtp.messagingengine.com ([66.111.4.25]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1cozxL-0006Vf-7y for pgsql-hackers@postgresql.org; Fri, 17 Mar 2017 22:02:44 +0000 Received: from compute7.internal (compute7.nyi.internal [10.202.2.47]) by mailout.nyi.internal (Postfix) with ESMTP id 956C0208A9; Fri, 17 Mar 2017 18:02:41 -0400 (EDT) Received: from frontend2 ([10.202.2.161]) by compute7.internal (MEProxy); Fri, 17 Mar 2017 18:02:41 -0400 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-sender:x-me-sender:x-sasl-enc:x-sasl-enc; s= fm1; bh=kOMl+I39uKXxHiob+Jd7AGYqrgI=; b=nlPH72xjS8HjdZjYiqSXC8ly FaZT0R2BEtwYEX7gRb2y25pqlxJqBSubWpKeMB6zHOt1k6uR8+Gfx/r3GsuI4bxc RwCRM54ljI1ACZtCPSZ8588wOuFLZAIo1gdATDFi1EBCX4VzGoRfSF627bj88m2O 5OWswIl+R6g6LzFZHhevwvZV93oGBREAPf9G4BEaOo5AZhUjPHSamMcfctsNXH9g ryUBe++7WIF5Cdijrpqf7AB2zjw7Lo2eps9ChF7I6OpjmOOPHzxYAO6OKxq/0RSG eIm4AODiI35dp8fdZyW4fBqyGZD/jHQubVSi/BPeu9NNvjlJ12qm1ShKSfriLg== X-ME-Sender: X-Sasl-enc: XX8x75K2dE8ww22HDekr83R5dgvhg6kLFLaY6CoRHVpm 1489788161 Received: from april.local (c-73-13-66-39.hsd1.pa.comcast.net [73.13.66.39]) by mail.messagingengine.com (Postfix) with ESMTPA id 5D56924519; Fri, 17 Mar 2017 18:02:41 -0400 (EDT) Subject: Re: [PATCH] Suppress Clang 3.9 warnings To: Aleksander Alekseev , David Steele References: <20170220141239.GD12278@e733.localdomain> <20170313153553.GB2564@e733.localdomain> Cc: PostgreSQL Developers From: Peter Eisentraut Organization: 2ndQuadrant Message-ID: <74b8619a-6077-83b6-efce-7b4fdc111bb8@2ndquadrant.com> Date: Fri, 17 Mar 2017 18:02:40 -0400 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: <20170313153553.GB2564@e733.localdomain> Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Pg-Spam-Score: -2.6 (--) 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 On 3/13/17 11:35, Aleksander Alekseev wrote: > Here is a new patch. I tried to make as little changes as possible. This > is no doubt not the most beautiful patch on Earth but it removes all > warnings. I anyone could suggest an approach that would be significantly > better please don't hesitate to share your ideas. I'm also seeing the -Wconstant-conversion warnings with clang-4.0. The warnings about strlcpy don't appear here. That might be something specific to the operating system. To address the -Wconstant-conversion warnings, I suggest changing the variables to unsigned char * as appropriate. However, this would require a large number of changes to all call sites of XLogRegisterData(), because they all have a cast like this: XLogRegisterData((char *) &xlrec, SizeOfHashMovePageContents); Perhaps the first argument could be changed to void *. -- Peter Eisentraut http://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