From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from smtp58.i.mail.ru (smtp58.i.mail.ru [217.69.128.38]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 7F48C46970E for ; Mon, 16 Dec 2019 16:40:46 +0300 (MSK) Date: Mon, 16 Dec 2019 16:40:41 +0300 From: Kirill Yukhin Message-ID: <20191216134041.wgijajmy4wemmzy4@tarantool.org> References: <20191127213037.94837-1-k.sosnin@tarantool.org> <20191127213037.94837-2-k.sosnin@tarantool.org> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20191127213037.94837-2-k.sosnin@tarantool.org> Subject: Re: [Tarantool-patches] [PATCH v2] build: GCC warning on strncpy List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Chris Sosnin Cc: tarantool-patches@dev.tarantool.org Hello, On 28 ноя 00:30, Chris Sosnin wrote: > Thank you for the review! > See second version below. > branch: https://github.com/tarantool/tarantool/tree/ksosnin/gh-4515-build-warning > issue: https://github.com/tarantool/tarantool/issues/4515 > > As long as we are sure, that strlen(sd_unix_path) < sizeof(sa.sun_path) > we can assume that there is always enough space and the path will be > null-terminated. Thus, copy 1 byte less to get rid of the warning. > > Closes #4515 I've checked your patch into 1.10, 2.2 and master. -- Regards, Kirill Yukhin