Message ID | 20220221204144.83995-1-joaofl@gmail.com |
---|---|
State | Changes Requested |
Headers | show
Return-Path: <swupdate+bncBDOYTGFEZIHRBI7SZ6IAMGQE5TFFNPI@googlegroups.com> X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=googlegroups.com header.i=@googlegroups.com header.a=rsa-sha256 header.s=20210112 header.b=I0z0/f8/; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=UZ2ACNNa; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=googlegroups.com (client-ip=2a00:1450:4864:20::63b; helo=mail-ej1-x63b.google.com; envelope-from=swupdate+bncbdoytgfezihrbi7sz6iamgqe5tffnpi@googlegroups.com; receiver=<UNKNOWN>) Received: from mail-ej1-x63b.google.com (mail-ej1-x63b.google.com [IPv6:2a00:1450:4864:20::63b]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4K2Z3v11cnz9sGS for <incoming@patchwork.ozlabs.org>; Tue, 22 Feb 2022 07:42:17 +1100 (AEDT) Received: by mail-ej1-x63b.google.com with SMTP id kw5-20020a170907770500b006ba314a753esf4923027ejc.21 for <incoming@patchwork.ozlabs.org>; Mon, 21 Feb 2022 12:42:17 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1645476132; cv=pass; d=google.com; s=arc-20160816; b=mEfmOsYrb0fFPc9TFu4EIDR9XYd03Tm5Cfp0bTI75dG8+g0SqN1EiDtaqAMRFCR/Ab x/OQ3FeSONL2L+zI9++xDfo23vyjd85lbuQlF4pbIl5e46VwnQNQgwHUBwEuW3urkNgp pd+nTru7hfJPS2NXI9icfUXrKvZP1s6U7X5waJNg3MwYaH3HG1qUnT/67CTACiNK7qpb TG5JEXdKNZStnNoWwXDrynI79RZkQ236yC4JOeXNJEKGdbEU5Y8Fsusc2uOyoqyFnBax lFiwG4PkCJQbEw0WWhZFn8wbb3Z/cnuxWpCIWeYIFl8/tyGC2ByiDs1r6BYuJ6Hg6AHe +G5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version:message-id:date :subject:cc:to:from:sender:dkim-signature:dkim-signature; bh=j9o9atzcercxaOJPA+JYfmEgML4fxGl3UJho4Y2ITCE=; b=MCNP+zaetquPXvrvs5hn7c3lm7UzeG91YKHXmNlUE4HtIPjNgVZQQe+pLDSXHAO7AW hAZAFpmjM3T+6vaHk/99aFmEVPnI1zaSFoO3aLx0XZmgby6/8ZX6yK6e0fD7NmhypVMh YSnS8kF2DPAj4BrI4gW7COXZ0NiZF5rvWo1Mee6DG1mhCX2hhCC6mgIDUrqPdntf6+1N e8N/xy1MHJnisjbKtb5oQunViP/DZd/FhHtTRoRYHwGSfsK14+H65VJoL57inZM4WdBR TKXaPqulxgWUBBf9Re9DoZMU/aFjGj+w2YW6KPnRPab1zK4OWkowEFwB2ZZZ3smGVpg6 vY1g== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DMc6CT0G; spf=pass (google.com: domain of joaofl@gmail.com designates 2a00:1450:4864:20::52b as permitted sender) smtp.mailfrom=joaofl@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :x-original-sender:x-original-authentication-results:precedence :mailing-list:list-id:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=j9o9atzcercxaOJPA+JYfmEgML4fxGl3UJho4Y2ITCE=; b=I0z0/f8/0By32UK/2HWCm506e0xpIJT6GOCeVbhTP5+9pSzOme6seUfuqouESLSCA4 02wW9qtzP09Pa7vtZuHaAYAqHdtN3teL51fKrWYoEU30UUxTNaghwQXVji3XCVaFxadL iZe4pSTB2pP0rCwoe8GEDEtHcLgU0jtVczRbJlq3L3DqoPQL0eW9ndJHW5mwiAV6yUZE ivMCM1vqZ4OcItw8rTnnUbIRXcs4AQnnUpSEsOEILTVZFRjnydcp+sjw60bcMfV+v9u9 nuzawWpr8sF39q6BCIWCpOKulVhcpfPK6Qn/m5tQbwzUuxd7wA3M4tO+Fc3O3KgjldYb 8OcQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:mime-version:x-original-sender :x-original-authentication-results:precedence:mailing-list:list-id :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=j9o9atzcercxaOJPA+JYfmEgML4fxGl3UJho4Y2ITCE=; b=UZ2ACNNahmr6n2x16Xmd77NJZgutwyHHm7xMSP/gTxxzadpLjNDOLvfkYcEejL5mQu CgwopLpge5VDWjnSmaNp4OiO73Ol4OTdyTeTsB16dAorqAFKFEXFgeKnBoHfZWkfNt5/ Pt0r7lon0qaZwuFYd8Hgpxh9S9+K0Es00uHiJgXaF9WU1dk8nr1nThPdGXbJlc+xg6FD OQstS45lWRzMP1yxTUxZbzj/xROHk3yFFdI+MprSnENbWASdeqrI/QwMUsUeAkcjmtfd ZIb3+YJ6BOqsnYX2xpukP75RHkgRvcLfq2PSHfOixqpnHgTwFllBUyCg3wDhzDulSK01 iooA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=sender:x-gm-message-state:from:to:cc:subject:date:message-id :mime-version:x-original-sender:x-original-authentication-results :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=j9o9atzcercxaOJPA+JYfmEgML4fxGl3UJho4Y2ITCE=; b=J/mfMXxp5C63xk3aeCu1NPcyKHAF+cBfTOiYaMqkIzGZQN4jaLDv8qxMssIcq8MSqx wjJSSEIOn8ynoV/JmyX5TsYRjAChpUS6rJvyqCUx4t63RdkFwxGdeajsn1hY+/w2YkWF 2SDhO9RTAMFwgh3HaaEtTgjOGmq6UE1bCLwE6yrQ8qtHwx2OyWjqFAcOI6w+k9agB59A KBT+qSMkF2/dkFEamiQnI7IqqOTbsv6pSybKV3vwDsRD0Org4in0bi+XcfIRlhaYThLE ChCxRieiH9GUywoMaMqNnAaPeQLrMvjM9Nz1Iu75hbU+VS5GY+MmFuv0N7byNesGLu5S DxAw== Sender: swupdate@googlegroups.com X-Gm-Message-State: AOAM532cfsDxhKXvfGbX0NBR79NM3W7QcYBV/z66jfO1liVX5IYvcDxP KaIxkcd2QKEAgJtvv8JoZYQ= X-Google-Smtp-Source: ABdhPJzuUynh3cdN+xVM78cnfU8xfxdinDF6H5eKuiGmGOqQqGzimJjQnRCo/W0Hqoa9JkJW9l6/JQ== X-Received: by 2002:a17:906:9454:b0:6b5:aa6:2822 with SMTP id z20-20020a170906945400b006b50aa62822mr16255981ejx.619.1645476132105; Mon, 21 Feb 2022 12:42:12 -0800 (PST) X-BeenThere: swupdate@googlegroups.com Received: by 2002:a17:906:a94a:b0:6d0:76e0:adbd with SMTP id hh10-20020a170906a94a00b006d076e0adbdls407417ejb.9.gmail; Mon, 21 Feb 2022 12:42:11 -0800 (PST) X-Received: by 2002:a17:906:199a:b0:6d1:aa59:2927 with SMTP id g26-20020a170906199a00b006d1aa592927mr4806428ejd.215.1645476131217; Mon, 21 Feb 2022 12:42:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645476131; cv=none; d=google.com; s=arc-20160816; b=SCyHHTK5pTslhPlOUa4/ivsazGWUn1H2+KOnCe8ihkqCFxtWsxSYAemP8lTM+T/Yj0 E8jQ9ejIipNzeNNTDYMYyRO9gtKTk1vPknp+r086egC5TXhrW/8tifmlmSPcuHZw7Ilt a6VhB7xtQPcgzxoCB32tKVeLArrEv3rKgh8VcKR4nKFLzZhDdUSyoohydELf8h0w8UeT DLNN7hMTM9wzdp9iE8zMsTGEbN5Gq8F4lEkB0bRiFZSPL5cvsCsydgr4kaPgNAckC4iZ lO8davwwuAcPrGAhcKY9R8e3QIesHLiJw+X7yWhuNeJKNKXvb4eWUFn85cWcTkY5c0EO 3SIQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=/azKPokRflMrgEf5vHmCRHBxsgCiBVpWyICsKf+ulg8=; b=BxLjrAn5TgoFyRXbL76Gii4qQP8B+jN3ITlJjdSvmoA716U9/DefkCHStodGF6+Cno glD66HNyjWjw/E/Xvw8QcYg6+8nDgp89D4KAC/cipw5S4Z/ql1AR9PhJMRniVs+3tM4D UYGclec1RNRPbXnMTGC1mnhKRW36btDxedf+nop8SZmyY11wN4N99k+peGhcXBfPVUZb zL8C8t6CwvemZaAKP+76mDNmRS4whY2WvtPeNP/XUQ0L3EQA4IfSK6zSd8eu3zab5GAO Eii9OA6kFujNjS0fvcS8evI83I0uRBkWEQCrdjV583HdAz78NGAPRtdCWqqic8JIIHw7 bkuA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DMc6CT0G; spf=pass (google.com: domain of joaofl@gmail.com designates 2a00:1450:4864:20::52b as permitted sender) smtp.mailfrom=joaofl@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-ed1-x52b.google.com (mail-ed1-x52b.google.com. [2a00:1450:4864:20::52b]) by gmr-mx.google.com with ESMTPS id j22si834892eda.1.2022.02.21.12.42.11 for <swupdate@googlegroups.com> (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Mon, 21 Feb 2022 12:42:11 -0800 (PST) Received-SPF: pass (google.com: domain of joaofl@gmail.com designates 2a00:1450:4864:20::52b as permitted sender) client-ip=2a00:1450:4864:20::52b; Received: by mail-ed1-x52b.google.com with SMTP id u18so31834049edt.6 for <swupdate@googlegroups.com>; Mon, 21 Feb 2022 12:42:11 -0800 (PST) X-Received: by 2002:a05:6402:5242:b0:40f:6a4f:ff33 with SMTP id t2-20020a056402524200b0040f6a4fff33mr23634435edd.30.1645476130962; Mon, 21 Feb 2022 12:42:10 -0800 (PST) Received: from lap.lan (12-6-178-143.ftth.glasoperator.nl. [143.178.6.12]) by smtp.googlemail.com with ESMTPSA id y23sm5623860ejk.153.2022.02.21.12.42.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Feb 2022 12:42:10 -0800 (PST) From: =?utf-8?q?Jo=C3=A3o_Loureiro?= <joaofl@gmail.com> To: swupdate@googlegroups.com Cc: =?utf-8?q?Jo=C3=A3o_Loureiro?= <joaofl@gmail.com> Subject: [swupdate] [PATCH] Cast download statistics to `size_t` before division Date: Mon, 21 Feb 2022 21:41:44 +0100 Message-Id: <20220221204144.83995-1-joaofl@gmail.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Original-Sender: joaofl@gmail.com X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=DMc6CT0G; spf=pass (google.com: domain of joaofl@gmail.com designates 2a00:1450:4864:20::52b as permitted sender) smtp.mailfrom=joaofl@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list swupdate@googlegroups.com; contact swupdate+owners@googlegroups.com List-ID: <swupdate.googlegroups.com> X-Spam-Checked-In-Group: swupdate@googlegroups.com X-Google-Group-Id: 605343134186 List-Post: <https://groups.google.com/group/swupdate/post>, <mailto:swupdate@googlegroups.com> List-Help: <https://groups.google.com/support/>, <mailto:swupdate+help@googlegroups.com> List-Archive: <https://groups.google.com/group/swupdate List-Subscribe: <https://groups.google.com/group/swupdate/subscribe>, <mailto:swupdate+subscribe@googlegroups.com> List-Unsubscribe: <mailto:googlegroups-manage+605343134186+unsubscribe@googlegroups.com>, <https://groups.google.com/group/swupdate/subscribe> |
Series |
Cast download statistics to `size_t` before division
|
expand
|
Hi João, On Mon, Feb 21, 2022 at 5:42 PM João Loureiro <joaofl@gmail.com> wrote: > > --- Commit log and your Signed-off-by are missing.
diff --git a/corelib/channel_curl.c b/corelib/channel_curl.c index 3ee801f..3a38a31 100644 --- a/corelib/channel_curl.c +++ b/corelib/channel_curl.c @@ -439,7 +439,9 @@ static int channel_callback_xferinfo(void *p, curl_off_t dltotal, curl_off_t dln else data->percent = percent; - DEBUG("Downloaded %d%% (%lu of %lu kB).", percent, dlnow / 1024, dltotal / 1024); + DEBUG("Downloaded %d%% (%zu of %zu kB).", percent, + (size_t)dlnow / 1024, + (size_t)dltotal / 1024); swupdate_download_update(percent, dltotal); return 0;