Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieA3F-0001pf-09 for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Dec 2019 03:49:37 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1ieA3D-0003vI-RE for pgsql-bugs@arkaria.postgresql.org; Mon, 09 Dec 2019 03:49:35 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.89) (envelope-from ) id 1ieA3D-0003vA-C0 for pgsql-bugs@lists.postgresql.org; Mon, 09 Dec 2019 03:49:35 +0000 Received: from cyclops.postgrespro.ru ([93.174.131.138] helo=mail.postgrespro.ru) by makus.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1ieA39-0001Pe-W4 for pgsql-bugs@lists.postgresql.org; Mon, 09 Dec 2019 03:49:34 +0000 Received: from localhost (localhost [127.0.0.1]) by mail.postgrespro.ru (Postfix) with ESMTP id 4761B21C3DE8 for ; Mon, 9 Dec 2019 06:49:29 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at postgrespro.ru X-Spam-Flag: NO X-Spam-Score: 0 X-Spam-Level: X-Spam-Status: No, score=x tagged_above=-99 required=4 WHITELISTED tests=[] autolearn=unavailable Received: from [192.168.0.108] (pool-77-222-111-80.is74.ru [77.222.111.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client did not present a certificate) by mail.postgrespro.ru (Postfix) with ESMTPSA id C929E21C2873 for ; Mon, 9 Dec 2019 06:49:28 +0300 (MSK) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=postgrespro.ru; s=mail; t=1575863368; bh=HL1ZhHZdpP2YFZhgFOuTEOyEGE0gLy9Is/ITe4KSSYQ=; h=To:From:Subject:Date; b=ijG3ln8q+74v197PP+6TxetugaZmZqKBhn+4Fav1IKKQE7ssBVmYbmzkjk/W52N+j FY+G/IL1tySaKnLa95cPGiu7KcBvR8aS515rCsQ4i2xRKvxy/N70BJDh0aTijehXzx XYZCTApT61bq6nzHuKGdawhYT6pGz/aF+sK6CEI0= To: PostgreSQL mailing lists From: Andrey Lepikhov Organization: Postgres Professional Subject: Warning in the RecordTransactionAbort routine during compilation with O3 flag Message-ID: Date: Mon, 9 Dec 2019 08:49:26 +0500 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.2.1 MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="------------12239467092CAE7C780A278B" Content-Language: en-US List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk This is a multi-part message in MIME format. --------------12239467092CAE7C780A278B Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Compiling of master postgres branch with CFLAGS="-O3" shows compiler warnings: xact.c: In function ‘RecordTransactionAbort’: xact.c:5709:55: warning: argument 1 null where non-null expected [-Wnonnull] XLogRegisterData(unconstify(char *, twophase_gid), strlen(twophase_gid) + 1); ^~~~~~~~~~~~~~~~~~~~ In file included from ../../../../src/include/c.h:61:0, from ../../../../src/include/postgres.h:46, from xact.c:18: /usr/include/string.h:384:15: note: in a call to function ‘strlen’ declared here extern size_t strlen (const char *__s) ^~~~~~ formatting.c: In function ‘parse_datetime’: formatting.c:4229:13: warning: ‘flags’ may be used uninitialized in this function [-Wmaybe-uninitialized] if (flags & DCH_ZONED) It's not a bug. But I prepare the patch to make compiler quiet. -- Andrey Lepikhov Postgres Professional https://postgrespro.com The Russian Postgres Company --------------12239467092CAE7C780A278B Content-Type: text/x-patch; charset=UTF-8; name="0001-Make-compiler-quiet.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="0001-Make-compiler-quiet.patch"