Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkI6o-0007MS-QG for pgsql-committers@arkaria.postgresql.org; Wed, 02 Dec 2020 02:43:10 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kkI6n-0003Cp-OX for pgsql-committers@arkaria.postgresql.org; Wed, 02 Dec 2020 02:43:09 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkI6n-0003Ci-J0 for pgsql-committers@lists.postgresql.org; Wed, 02 Dec 2020 02:43:09 +0000 Received: from oss.nttdata.com ([49.212.34.109]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kkI6g-0004Xk-UE for pgsql-committers@lists.postgresql.org; Wed, 02 Dec 2020 02:43:08 +0000 Received: from hnk.local (p1295030-ipngn4902funabasi.chiba.ocn.ne.jp [153.166.85.30]) by oss.nttdata.com (Postfix) with ESMTPSA id 1788D625CF; Wed, 2 Dec 2020 11:42:59 +0900 (JST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.102.3 at oss.nttdata.com Subject: Re: pgsql: Move SHA2 routines to a new generic API layer for crypto hashes To: Michael Paquier , pgsql-committers@lists.postgresql.org References: From: Fujii Masao Message-ID: Date: Wed, 2 Dec 2020 11:42:58 +0900 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.14; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: Content-Type: multipart/mixed; boundary="------------0A9A3953ABB492EE1F562718" 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. --------------0A9A3953ABB492EE1F562718 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit On 2020/12/02 10:41, Michael Paquier wrote: > Move SHA2 routines to a new generic API layer for crypto hashes Thanks for improving this! I got the following compiler failure. ISTM that the variable "status" in both pg_cryptohash_update() and pg_cryptohash_final() needs to be initialized with 0. Patch attached. Thought? cryptohash_openssl.c: In function ‘pg_cryptohash_update’: cryptohash_openssl.c:144:5: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (status <= 0) ^ cryptohash_openssl.c: In function ‘pg_cryptohash_final’: cryptohash_openssl.c:179:5: error: ‘status’ may be used uninitialized in this function [-Werror=maybe-uninitialized] if (status <= 0) ^ cc1: all warnings being treated as errors make[2]: *** [cryptohash_openssl.o] Error 1 : recipe for target 'cryptohash_openssl.o' failed Regards, -- Fujii Masao Advanced Computing Technology Center Research and Development Headquarters NTT DATA CORPORATION --------------0A9A3953ABB492EE1F562718 Content-Type: text/plain; charset=UTF-8; x-mac-type="0"; x-mac-creator="0"; name="initialize_status.patch" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="initialize_status.patch" ZGlmZiAtLWdpdCBhL3NyYy9jb21tb24vY3J5cHRvaGFzaF9vcGVuc3NsLmMgYi9zcmMvY29t bW9uL2NyeXB0b2hhc2hfb3BlbnNzbC5jCmluZGV4IDhlMmM2OWI0OGIuLjMzZjE3Y2FjMzMg MTAwNjQ0Ci0tLSBhL3NyYy9jb21tb24vY3J5cHRvaGFzaF9vcGVuc3NsLmMKKysrIGIvc3Jj L2NvbW1vbi9jcnlwdG9oYXNoX29wZW5zc2wuYwpAQCAtMTE5LDcgKzExOSw3IEBAIHBnX2Ny eXB0b2hhc2hfaW5pdChwZ19jcnlwdG9oYXNoX2N0eCAqY3R4KQogaW50CiBwZ19jcnlwdG9o YXNoX3VwZGF0ZShwZ19jcnlwdG9oYXNoX2N0eCAqY3R4LCBjb25zdCB1aW50OCAqZGF0YSwg c2l6ZV90IGxlbikKIHsKLQlpbnQJCQlzdGF0dXM7CisJaW50CQkJc3RhdHVzID0gMDsKIAog CWlmIChjdHggPT0gTlVMTCkKIAkJcmV0dXJuIDA7CkBAIC0xNTQsNyArMTU0LDcgQEAgcGdf Y3J5cHRvaGFzaF91cGRhdGUocGdfY3J5cHRvaGFzaF9jdHggKmN0eCwgY29uc3QgdWludDgg KmRhdGEsIHNpemVfdCBsZW4pCiBpbnQKIHBnX2NyeXB0b2hhc2hfZmluYWwocGdfY3J5cHRv aGFzaF9jdHggKmN0eCwgdWludDggKmRlc3QpCiB7Ci0JaW50CQkJc3RhdHVzOworCWludAkJ CXN0YXR1cyA9IDA7CiAKIAlpZiAoY3R4ID09IE5VTEwpCiAJCXJldHVybiAwOwo= --------------0A9A3953ABB492EE1F562718--