From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from [87.239.111.99] (localhost [127.0.0.1]) by dev.tarantool.org (Postfix) with ESMTP id 8F4747030F; Thu, 25 Feb 2021 10:50:07 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 8F4747030F DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614239407; bh=/VBAe6Q4yuTPYfA1Q+MeFwh9hdrLF5HcdpVCFGpypws=; h=Date:To:Cc:References:In-Reply-To:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From:Reply-To:From; b=yt0MytDxxEvkTX/ACGp1FdeI/YzMQNMgApk2wvXSrCKaOINsP51MPSXnip+H1Gy2l Dfv08WLJxg9ZwAoN/S48U3GJb1mvYkwohJlesdPQ8Me5Y4ByMnygYv7CjqOmzXXePR lwTSetwpWlC/yJzIrZkYelwT4yZ/XTRW7mCjf/uc= Received: from mail-lj1-f175.google.com (mail-lj1-f175.google.com [209.85.208.175]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by dev.tarantool.org (Postfix) with ESMTPS id 6660A7030F for ; Thu, 25 Feb 2021 10:50:06 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 6660A7030F Received: by mail-lj1-f175.google.com with SMTP id 2so844710ljr.5 for ; Wed, 24 Feb 2021 23:50:06 -0800 (PST) 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:references :mime-version:content-disposition:in-reply-to:user-agent; bh=02UMxrqBGcG8GrNrSNqaRbdkOhroLGaXm+p3C7q5M78=; b=ERJ5Lc5IBYKRAO4cYWHOmbr0ig69fTFNlKQ5BJ5y5PO7U+o24NFODhGtkvPQVFOOeW l7Wu1enx763LzESO47FEIb+BD7+qh1Y2orcLZU95G5Q06OlFKBW0Xv/vDcDW51W3An+O d61MIUJ7q4QBXiRNPKRd675xvp/ScoGTMrtVdIMT6I2/eJnPraIvQ5E/25BiP1QRjzNJ J304pe7Lc4touAEncn0ivfp1gJDra+8NxOG5wiN3bgQ+1MUvkhZu8dCWvRJasRpIVK+k 0+Ko9Z+09QR97maH38++7NxT9qbcEPFXEpSrZ48J6TSiCCu9qNg0Ox6LOZeaQNpHVNXv Q6Hw== X-Gm-Message-State: AOAM533WrhjIhQZOh+vbWzrCeaJ+TDpWb3VvUz7MnyYDMTxT5WQdCuO1 CamCnl3s8bPlh1xIagm0u8W7t/mLZhc= X-Google-Smtp-Source: ABdhPJxq8sw5HggNzt1MtgyGD8hzpo67OvbsX9/l2j6GV6Hig8NYQGfujWLnBLiy71O1afwjxjHqwA== X-Received: by 2002:a2e:8255:: with SMTP id j21mr929033ljh.507.1614239405295; Wed, 24 Feb 2021 23:50:05 -0800 (PST) Received: from grain.localdomain ([5.18.171.94]) by smtp.gmail.com with ESMTPSA id n6sm1016244lfa.290.2021.02.24.23.50.04 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 24 Feb 2021 23:50:04 -0800 (PST) Received: by grain.localdomain (Postfix, from userid 1000) id 5AA7056009B; Thu, 25 Feb 2021 10:50:03 +0300 (MSK) Date: Thu, 25 Feb 2021 10:50:03 +0300 To: Vladislav Shpilevoy Cc: tml Message-ID: References: <20210222182030.76232-1-gorcunov@gmail.com> <20210224153626.121506-1-gorcunov@gmail.com> <20210224153626.121506-4-gorcunov@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/2.0.5 (2021-01-21) Subject: Re: [Tarantool-patches] [PATCH v2 03/10] raft: fix say_x arguments X-BeenThere: tarantool-patches@dev.tarantool.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Tarantool development patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Cyrill Gorcunov via Tarantool-patches Reply-To: Cyrill Gorcunov Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" On Wed, Feb 24, 2021 at 11:39:47PM +0100, Vladislav Shpilevoy wrote: > Thanks for the patch! > > On 24.02.2021 16:36, Cyrill Gorcunov wrote: > > Use explicit "%lld" for int64_t type. > > In the changes you use %llu in both cases. Good catch! Thanks. > > @@ -322,7 +322,8 @@ raft_process_msg(struct raft *raft, const struct raft_msg *req, uint32_t source) > > /* Outdated request. */ > > if (req->term < raft->volatile_term) { > > say_info("RAFT: the message is ignored due to outdated term - " > > - "current term is %u", raft->volatile_term); > > + "current term is %llu", > > + (long long)raft->volatile_term); > > It is unsigned. So the cast must be 'unsigned long long'. > The same below. Atually this is done on a purpose. Signed/unsigned objects are kept in same amount of memory storage, which is guaranteed by the standart. We can use (long long) here to specify the size of object while the sign gonna be interpreted by formatter itself, and this is what our static formatter does test -- storage size. So no, I think we can continue use (long long) specificator here.