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 4DE746C7D2; Thu, 25 Feb 2021 01:40:24 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 4DE746C7D2 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=tarantool.org; s=dev; t=1614206424; bh=vfYLpOAtM2ylp700gBsmeSl2wWBM5KfPk2H+9LKNPXY=; h=To:References:Date:In-Reply-To:Subject:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To: From; b=kGx70ybVupzFCr8EPZxyW5R/fQef4Wd3uJhq0zKzVeLFCejARHqCUbid8QhZZPph8 Fbc2MP482Hixu0D2DqayObIko/VZV/OhRTCCluD1gZiISGuUV5FTUil/YvHbwL95AE iw012lFXvuNnPwVaFj84lErH4G6CeQwDmKCnsTlA= Received: from smtp51.i.mail.ru (smtp51.i.mail.ru [94.100.177.111]) (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 855E36C7D2 for ; Thu, 25 Feb 2021 01:39:48 +0300 (MSK) DKIM-Filter: OpenDKIM Filter v2.11.0 dev.tarantool.org 855E36C7D2 Received: by smtp51.i.mail.ru with esmtpa (envelope-from ) id 1lF2ou-0007CO-3l; Thu, 25 Feb 2021 01:39:48 +0300 To: Cyrill Gorcunov , tml References: <20210222182030.76232-1-gorcunov@gmail.com> <20210224153626.121506-1-gorcunov@gmail.com> <20210224153626.121506-4-gorcunov@gmail.com> Message-ID: Date: Wed, 24 Feb 2021 23:39:47 +0100 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.7.1 MIME-Version: 1.0 In-Reply-To: <20210224153626.121506-4-gorcunov@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-7564579A: B8F34718100C35BD X-77F55803: 4F1203BC0FB41BD975C3EC174F5669228C980786C9DBA186ED94931C77F7596E182A05F538085040D112F15D5D2F6BB8D5D2F4DD63717FDF3B0D66C4EB97BA008F567010CE66AC08 X-7FA49CB5: FF5795518A3D127A4AD6D5ED66289B5278DA827A17800CE71EC9B71B819B57BFEA1F7E6F0F101C67BD4B6F7A4D31EC0BCC500DACC3FED6E28638F802B75D45FF8AA50765F7900637B3D04545C3E424F58638F802B75D45FF5571747095F342E8C7A0BC55FA0FE5FCEF6CC647C0669FAF1F6903045EE082B081C5EB3FF2FE5951389733CBF5DBD5E913377AFFFEAFD269176DF2183F8FC7C0A29E2F051442AF778941B15DA834481FCF19DD082D7633A0EF3E4896CB9E6436389733CBF5DBD5E9D5E8D9A59859A8B6042F1592492B88C6CC7F00164DA146DA6F5DAA56C3B73B237318B6A418E8EAB8D32BA5DBAC0009BE9E8FC8737B5C22499378EFCC79B5FE1E76E601842F6C81A12EF20D2F80756B5F7E9C4E3C761E06A776E601842F6C81A127C277FBC8AE2E8BD195229DC052B8B93AA81AA40904B5D9DBF02ECDB25306B2B25CBF701D1BE8734AD6D5ED66289B5278DA827A17800CE7B2B7C64F398C741067F23339F89546C5A8DF7F3B2552694A6FED454B719173D6725E5C173C3A84C3E2C51E5CF308F7B035872C767BF85DA2F004C906525384306FED454B719173D6462275124DF8B9C9AE7E30DF62CE24E4E5BFE6E7EFDEDCD789D4C264860C145E X-C1DE0DAB: 0D63561A33F958A57237E2921241C967B8F147B02C31A816679C0FE4211786B5D59269BC5F550898D99A6476B3ADF6B47008B74DF8BB9EF7333BD3B22AA88B938A852937E12ACA75968C9853642EB7C3410CA545F18667F91A7EA1CDA0B5A7A0 X-C8649E89: 4E36BF7865823D7055A7F0CF078B5EC49A30900B95165D349F4E6BC39AAD02BB37ABAE8E7F881924DECA57BFC921222EB5122D35D7E109B21536807277A5F0CD1D7E09C32AA3244C67481D4E615A0B1387031CBF67BE0F02250262A5EE9971B0729B2BEF169E0186 X-D57D3AED: 3ZO7eAau8CL7WIMRKs4sN3D3tLDjz0dLbV79QFUyzQ2Ujvy7cMT6pYYqY16iZVKkSc3dCLJ7zSJH7+u4VD18S7Vl4ZUrpaVfd2+vE6kuoey4m4VkSEu530nj6fImhcD4MUrOEAnl0W826KZ9Q+tr5ycPtXkTV4k65bRjmOUUP8cvGozZ33TWg5HZplvhhXbhDGzqmQDTd6OAevLeAnq3Ra9uf7zvY2zzsIhlcp/Y7m53TZgf2aB4JOg4gkr2biojvz1c9SWJtj/3tfwIXVwOCw== X-Mailru-Sender: 504CC1E875BF3E7D9BC0E5172ADA311046BF50748817AA4D51A68C7DE94E01F81A1041047F35C80D07784C02288277CA03E0582D3806FB6A5317862B1921BA260ED6CFD6382C13A6112434F685709FCF0DA7A0AF5A3A8387 X-Mras: Ok 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: Vladislav Shpilevoy via Tarantool-patches Reply-To: Vladislav Shpilevoy Errors-To: tarantool-patches-bounces@dev.tarantool.org Sender: "Tarantool-patches" 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. > Signed-off-by: Cyrill Gorcunov > --- > src/lib/raft/raft.c | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/lib/raft/raft.c b/src/lib/raft/raft.c > index 4ea4fc3f8..261ff072b 100644 > --- a/src/lib/raft/raft.c > +++ b/src/lib/raft/raft.c > @@ -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. > return 0; > } > > @@ -653,7 +654,7 @@ raft_sm_become_candidate(struct raft *raft) > static void > raft_sm_schedule_new_term(struct raft *raft, uint64_t new_term) > { > - say_info("RAFT: bump term to %llu, follow", new_term); > + say_info("RAFT: bump term to %llu, follow", (long long)new_term); > assert(new_term > raft->volatile_term); > assert(raft->volatile_term >= raft->term); > raft->volatile_term = new_term; >