From patchwork Fri Sep 23 10:51:39 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 12986445 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 66B89ECAAD8 for ; Fri, 23 Sep 2022 10:52:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229616AbiIWKwR (ORCPT ); Fri, 23 Sep 2022 06:52:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58722 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231759AbiIWKwC (ORCPT ); Fri, 23 Sep 2022 06:52:02 -0400 Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-eopbgr70102.outbound.protection.outlook.com [40.107.7.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1B2F5A6C57 for ; Fri, 23 Sep 2022 03:51:59 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lCERd2Q06qte1J9erj54QRI/dW7+QrjxRkBu4x/551ZGVMkkvy5kv6ooYexo9yHgnFBtQdKyHwLpeIukdGT9d4T/PljJl6hyqExfEFSGSRwCp8gV/JRFQKyLhHt/ygX4DIAiydwxxXxSjTIPhBNwg5r2ufNOpIBvHkhjq6ZXI4sAHi0T7HSdNyKu1wLqilOw0ddC1ojqJjDB6GYp7nyN7G9ruLvdwSJoUZn0Zq+rCRVPEZTlIXPm6hviWnV0UlMY7iew5LoVHRN1ygUMP6kJip/FPrzVDWNNcyxzKj4eZtvM5jWDuvSjnEyrBL/5qGzVO/ZgIhNzeZ7ps3V+jcqIyw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=HpHqeuIKsEsGRDsZvj7O0lI1rwtdZ/lSaqEmOLIK3rY=; b=RApy04e302thO7lLvgwafiBw/cnUnDm0DRxdf81n2euKhIYAIxLgRpt8d1F7kb9L4kZixhcpLPeSTP2XWhl/al3tBY0z5gTmzHWtpFvaOu4FxSpMKpLyOGE+d8oRy7E/YFxMDiYC70COqDW/Fk5ucisJByiiLGgkVpRamSRUs8h6ZgWbqdkTwthqC02+BYWPOUbiQWMwxRHuxh42FT4b7n4kHdGoK5ccA1Oeq7NCsu05p+Lyanc/9DZDWf9bp2FAywEdqM7R491P5la/AUDOtcXamlDZLda4ZjTacvz+2azuWnU3s6VZ6oaZoe2NWO8id5XBOps+PYUYVhTRPfjoNA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arri.de; dmarc=none action=none header.from=arri.de; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arrigroup.onmicrosoft.com; s=selector1-arrigroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=HpHqeuIKsEsGRDsZvj7O0lI1rwtdZ/lSaqEmOLIK3rY=; b=i8qbAaxbWiuqSqxuV/rSARR4loHckb/xpzjuHmz5saX7Am3VwpQmIfXXZJCV1GkLwI8sDz9jBjV8hCw/Cly0WZqyeuhWo13VBl0HCmCnjNc1dqix2OqTJ45Of3wJY/ZF5YkRB1tOjwvjYGZZ4yGnv7pLlNT4VuomvWCfgCL4eWI= Received: from GV3P280CA0030.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:b::35) by DU2PR07MB8078.eurprd07.prod.outlook.com (2603:10a6:10:23a::21) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.7; Fri, 23 Sep 2022 10:51:56 +0000 Received: from HE1EUR02FT065.eop-EUR02.prod.protection.outlook.com (2603:10a6:150:b:cafe::f4) by GV3P280CA0030.outlook.office365.com (2603:10a6:150:b::35) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17 via Frontend Transport; Fri, 23 Sep 2022 10:51:56 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by HE1EUR02FT065.mail.protection.outlook.com (10.152.11.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Fri, 23 Sep 2022 10:51:55 +0000 Received: from N95HX1G2.arri.de (192.168.54.71) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 23 Sep 2022 12:51:54 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [PATCH BlueZ 1/3] client/player: fix printf format string Date: Fri, 23 Sep 2022 12:51:39 +0200 Message-ID: <20220923105141.20176-1-ceggers@arri.de> X-Mailer: git-send-email 2.35.3 MIME-Version: 1.0 X-Originating-IP: [192.168.54.71] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1EUR02FT065:EE_|DU2PR07MB8078:EE_ X-MS-Office365-Filtering-Correlation-Id: 4364c82c-4ecb-4127-ace2-08da9d51a1b7 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: qsKZl5ejnDeKSoOJddEq1DqZgFqkv33LQlxTV/JVHghpLQdDJ5rGgtxQVsGQSvOrZa3Gn0Y++FcdmCHjwWSjL9diYhUq20W6TaV/X/3HDTn7IApOO+C4nX3wEXN9Lm8bZ0KFz3VANMVWgszLcGOVCSXiTLpX4bKEPemi7aFITTFM44Ti03RDL3mmg8nUgQAF9jvHLet/A+Y3gcXIFBLzsYSs/urycVS7mBkhEwDWtyiTg8lPdKoOUUZvlAFra3K2CuIU4+5cznTj4duDSxrLtf8HH0KV/h6slaUnp7UmEcijyc4i32fJhOc17HhzpIBOqCFp1mlV1CLmuunjEgY+CsamSCW3CwwS/fpbMeHqgvZIU2mOwHDlJyRSNsFU9EBnB7mjc0skF6aZMdKnYODm6ozIAZxLIXoO+usN5Z0PaQGxwrwTvjIrlsJf9M+Ve09ciorNMB5NUYdZidgVk+VnpjnppsoAnjSEjBJ8C9TGutLNOxp0r58tIGsa/YEKRaMHyTcumv32JxS3Ip6zH6khnSzO/cEGwp68aDUfrhtqpolfIjTPztmdBqHnSzpisWgugVjFa2avA87DCu+U+PwZwOVDaierdCsiwlOKb4pDUDjT+Dzkw29N4uLEBk2N5P3vwD/coe0dN/QLLbAje4ZcDrPEYfbqjeNh5n6DIfQuRCHkfDgS/aAvNTldBGQRr7ZiAEqxed+NWkBR8G7xkXwMS6diQAbKeR/yFU9RwUKZFPckVwVxUHTZL2UD4P5OjfbgLurMhqBfp6GR8ankmfkUvpdEI6CLLq++x2TBuYAFwsO8t+m+8ooiGB9HPGjzgfka X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(396003)(346002)(136003)(39860400002)(376002)(451199015)(46966006)(36840700001)(36756003)(2906002)(186003)(8936002)(2616005)(4744005)(16526019)(336012)(86362001)(1076003)(26005)(426003)(41300700001)(356005)(70586007)(47076005)(4326008)(70206006)(8676002)(81166007)(82310400005)(316002)(82740400003)(36860700001)(7696005)(6916009)(83380400001)(5660300002)(6666004)(107886003)(478600001)(40480700001)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 10:51:55.6683 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 4364c82c-4ecb-4127-ace2-08da9d51a1b7 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT065.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR07MB8078 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org Use macros from inttypes.h for correct printf format specifier for int64_t --- client/player.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/player.c b/client/player.c index 0daacabf3c27..30ae263c8e41 100644 --- a/client/player.c +++ b/client/player.c @@ -15,7 +15,7 @@ #define _GNU_SOURCE #include #include -#include +#include #include #include #include @@ -3056,7 +3056,7 @@ static void send_wait(struct timespec *t_start, uint32_t us) delta_us = us - TS_USEC(&t_diff); if (delta_us < 0) { - bt_shell_printf("Send is behind: %zd us - skip sleep", + bt_shell_printf("Send is behind: %" PRId64 " us - skip sleep", delta_us); delta_us = 1000; } From patchwork Fri Sep 23 10:51:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 12986446 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id A71F0C6FA82 for ; Fri, 23 Sep 2022 10:52:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231501AbiIWKwS (ORCPT ); Fri, 23 Sep 2022 06:52:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59602 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231802AbiIWKwD (ORCPT ); Fri, 23 Sep 2022 06:52:03 -0400 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2123.outbound.protection.outlook.com [40.107.21.123]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8C705E6DC1 for ; Fri, 23 Sep 2022 03:52:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=A0NyMoyTv8GFFUYqMc17bsERpO4vFC177c4K6m+atsONKzOJsuF6Dr6QIApsWLP+zzpNucdlXqId8XthWx9E+tfEZuBDgo3uEaas2PhTszkQAJ7FNYhb9UvcHkfF/iSTGNDObI9lSs0N81VjtG06vYAqp/V2cnwnc51iQ41fI4ieFSDNi6UZXZx5N5+nRrDHjPF7a59VXRElzJKfem/9khAP9X/VMoSxrw57IgFvCujYdvup7mD5d2gHxTNFNfRk/3ZYaFnQHp9/caMdfoese+1Hp/sIH1bBMgm5+WmWercHFstW3p4UypwxCwLiVdXGcDCZXovG0xXDSlSz+YHKwg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=50xMhpPO3Rg7XAYyeNB99HP0gHgE0G9QHClArr/M2Sk=; b=WEo9z+aqX40HhJNbqqDCcLJjYR1cADoYIEAbaTYVKsojzQQfR0t0AK01OGnhbRi19J6i1I9Nn4KgVY18jwhKzUa6emekxgwHsL5CRTyQ4Tv5miiIcSWqAHyYspugsXoA9bvq7bL3O3KTRgViHz6FZL3/zmu1o10WgL7VO/QlVd4fK8Yk0xhJQeqhs61uPVdU2l5zF4/crS1x+XdVvM4GyPfOmfyS55zsZlJWEPPip8UXDdBOprGBzvpoyljtn/S8Vr1dWCAOmIVIUipKS1C/ibk3BIFtHCel6E2T4nnzX1/2MqdvIN+twj4UAzbTwE6YvAnl/M3YiCL6A3yTeT9xcw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arri.de; dmarc=none action=none header.from=arri.de; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arrigroup.onmicrosoft.com; s=selector1-arrigroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=50xMhpPO3Rg7XAYyeNB99HP0gHgE0G9QHClArr/M2Sk=; b=y1r1GvDllZX3tzwRAvJDuQMf11Z3EKnmEVtYON1IhvINfpIZhLz4XNiFJ6jYnqryRqxTAcMZ32tS+gX3muo4R80cIkV/LUKb5Kj/y0f7qMWJOyXiCXP7nqOjhVCmDgpTUWZj+dgDy9xLJWLt+CYVxeh7AvboYypU1A4NxS/Fb5g= Received: from GV3P280CA0011.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:b::7) by AM7PR07MB6961.eurprd07.prod.outlook.com (2603:10a6:20b:1b4::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.9; Fri, 23 Sep 2022 10:51:57 +0000 Received: from HE1EUR02FT065.eop-EUR02.prod.protection.outlook.com (2603:10a6:150:b:cafe::8b) by GV3P280CA0011.outlook.office365.com (2603:10a6:150:b::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.17 via Frontend Transport; Fri, 23 Sep 2022 10:51:57 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by HE1EUR02FT065.mail.protection.outlook.com (10.152.11.77) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Fri, 23 Sep 2022 10:51:56 +0000 Received: from N95HX1G2.arri.de (192.168.54.71) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 23 Sep 2022 12:51:55 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [PATCH BlueZ 2/3] monitor: fix printf format strings Date: Fri, 23 Sep 2022 12:51:40 +0200 Message-ID: <20220923105141.20176-2-ceggers@arri.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220923105141.20176-1-ceggers@arri.de> References: <20220923105141.20176-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.71] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1EUR02FT065:EE_|AM7PR07MB6961:EE_ X-MS-Office365-Filtering-Correlation-Id: cb370287-dce5-4d28-1bc6-08da9d51a263 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: kKq3Ecl0s1r+IhdiozL7Ffz4JicPB96aNCFRzKY56rZJg2qqyh741gZvNakKsqQPSEjB0KplexjAP/kcQnrFGfvDDyfqBQ48PsDPYX14DQspt+wMd6foNYc3MoM37SjoR8xv/re8MiQ3NEUF//5nQcjT9VVfJkLo2mrVl46Nf+ztzH8f3w3TMlbKul1KgrcTYkqt2cwGqC2JFi9D7HC+CECHz/9Y4TzmpyHFbHE5cuyIfT+a3tjgofs88KP7aQWSeNBH9bVElR0I5pn1X/9ubYyu1lWkUllGQS0olqvda7/Uf9hPK/ihFEC47Y4ihaWBK+mjIWvINaDXM0ZWLcgLVMqJkqeBLcp8cTzP17GcREslskboZNWBvA4r4h+eOy6TGNMiOafg3pZu3HgyJeFrPCHZv70R1aSsfRnN/AxPhILdF6MRPCw/cL4lvAIidvYCFpMiWv+/r2rr2ZlDebSWQyzdosC31jPZ1t45bbobwplpfTKsUm82wzEl44MmvUn6Quw77VSCoJY+V3NJZ7vuG24Ea80n15h0sbXH01ivjVXKjxmX0qubmFhF+g7cJrmmSqtSKEeSbXIRFNcH+0AAmkcrijZtBu6BmzKmeq57/pgb4J5RzCZLEt8W3ljVxd/eTRJ4VeNgSXgB7EXagqKPv/u6bTIjbxvOAyFXBsJ7a+ELP13GYCcQHsVMw9JhVe9+k62OIFFJJoy0fTasQVzMWjkbuyTrwFDdkdd3xFFL21CkI1ubXKrJVo9FK5I9OtC58dlsO6XulCCi18J6HVV2oA== X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(376002)(136003)(396003)(39850400004)(346002)(451199015)(46966006)(36840700001)(26005)(6916009)(107886003)(36756003)(2906002)(7696005)(6666004)(1076003)(16526019)(186003)(2616005)(86362001)(70586007)(83380400001)(70206006)(4326008)(426003)(336012)(316002)(41300700001)(40480700001)(8676002)(8936002)(5660300002)(36860700001)(47076005)(81166007)(82310400005)(478600001)(82740400003)(356005)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 10:51:56.7933 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: cb370287-dce5-4d28-1bc6-08da9d51a263 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT065.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR07MB6961 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org time_t is 64 bit (long long) on many 32 bit platforms (e.g. ARM) now --- monitor/analyze.c | 21 ++++++++++++--------- monitor/packet.c | 10 ++++++---- 2 files changed, 18 insertions(+), 13 deletions(-) diff --git a/monitor/analyze.c b/monitor/analyze.c index ac23e13bbd42..50e7e5542793 100644 --- a/monitor/analyze.c +++ b/monitor/analyze.c @@ -172,15 +172,18 @@ static void conn_destroy(void *data) print_field("%lu RX packets", conn->rx_num); print_field("%lu TX packets", conn->tx_num); print_field("%lu TX completed packets", conn->tx_num_comp); - print_field("%ld msec min latency", - conn->tx_lat_min.tv_sec * 1000 + - conn->tx_lat_min.tv_usec / 1000); - print_field("%ld msec max latency", - conn->tx_lat_max.tv_sec * 1000 + - conn->tx_lat_max.tv_usec / 1000); - print_field("%ld msec median latency", - conn->tx_lat_med.tv_sec * 1000 + - conn->tx_lat_med.tv_usec / 1000); + print_field("%lld msec min latency", + (long long) + (conn->tx_lat_min.tv_sec * 1000 + + conn->tx_lat_min.tv_usec / 1000)); + print_field("%lld msec max latency", + (long long) + (conn->tx_lat_max.tv_sec * 1000 + + conn->tx_lat_max.tv_usec / 1000)); + print_field("%lld msec median latency", + (long long) + (conn->tx_lat_med.tv_sec * 1000 + + conn->tx_lat_med.tv_usec / 1000)); print_field("%u octets TX min packet size", conn->tx_pkt_min); print_field("%u octets TX max packet size", conn->tx_pkt_max); print_field("%u octets TX median packet size", conn->tx_pkt_med); diff --git a/monitor/packet.c b/monitor/packet.c index 1344fd5b2503..1a41498e9c52 100644 --- a/monitor/packet.c +++ b/monitor/packet.c @@ -384,8 +384,9 @@ static void print_packet(struct timeval *tv, struct ucred *cred, char ident, } if (filter_mask & PACKET_FILTER_SHOW_TIME) { - n = sprintf(ts_str + ts_pos, " %02d:%02d:%02d.%06lu", - tm.tm_hour, tm.tm_min, tm.tm_sec, tv->tv_usec); + n = sprintf(ts_str + ts_pos, " %02d:%02d:%02d.%06llu", + tm.tm_hour, tm.tm_min, tm.tm_sec, + (long long)tv->tv_usec); if (n > 0) { ts_pos += n; ts_len += n; @@ -393,8 +394,9 @@ static void print_packet(struct timeval *tv, struct ucred *cred, char ident, } if (filter_mask & PACKET_FILTER_SHOW_TIME_OFFSET) { - n = sprintf(ts_str + ts_pos, " %lu.%06lu", - tv->tv_sec - time_offset, tv->tv_usec); + n = sprintf(ts_str + ts_pos, " %llu.%06llu", + (long long)(tv->tv_sec - time_offset), + (long long)tv->tv_usec); if (n > 0) { ts_pos += n; ts_len += n; From patchwork Fri Sep 23 10:51:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Eggers X-Patchwork-Id: 12986444 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2FC20C6FA82 for ; Fri, 23 Sep 2022 10:52:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbiIWKwQ (ORCPT ); Fri, 23 Sep 2022 06:52:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231805AbiIWKwD (ORCPT ); Fri, 23 Sep 2022 06:52:03 -0400 Received: from EUR03-AM7-obe.outbound.protection.outlook.com (mail-am7eur03on2124.outbound.protection.outlook.com [40.107.105.124]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5BE28E6DC0 for ; Fri, 23 Sep 2022 03:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=O2G4X1xsHUkaDbDRDsO6Mex6AuR7ZgAUJrmt9GtaZABBqmrciD3lZfWj1lWF878cWzblro7Hri51+1O/sgLpkN0wdgU1dHd3MD1t6G1jQ5/fBbNMwWcEqvW8cOjNNyIJAZNrfM50VP0lrZzgbwHpEgxSYOvCvhT/nhYJ1z4LPaB32XMkFmqwjcTfdhAEYITI5U/fSBrkKYBnyZtT/b/2hefP0bz03alus6Es3CEKUSqO33ExU9s+hQsDNwEdSPZNWMY6JQE/YsNcJ47TNZ4kdVESIYSYbIvRGi+DEVeTsxJOFua2idXVoRMoX8Xi5JRAFUBzmH3qfIuMDmULL+uuSQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=F3+hMbm3cTSXugM51pLIqBXjw+p/nBjYEDyQ0bPg38A=; b=Res7/YxykyaK9w+qNzX63QaLHQj4KPzZZFDa4OtnrWDZvxKHBrAGn4d8Mj4F3AbTayx+9yiX1PMnsV93GVDIcV4l0rNEyfscIqx22lezVGjHW4quKWWU2ov+1ON2vB82vi2RZ/KRXq7TbbLuTS+ulZpDuFOKgNQv1YdZnxtG9AF/I3f4N3UPhBNTBk6ufVizLQifpbNRuozkBH1JbyuBCLwxQOGCJ03DLjWyddPYNuRuhXW4lR+Sj0ZCTKtvvk6govqydSJ4EtE75WVmCfBcefRFPBl0lTZPp+aRDoDIaJZWd0VX72X8+hsGP2KekQmyy4TtAdKpudKRIm+O4hyDLQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=fail (sender ip is 217.111.95.7) smtp.rcpttodomain=vger.kernel.org smtp.mailfrom=arri.de; dmarc=none action=none header.from=arri.de; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=arrigroup.onmicrosoft.com; s=selector1-arrigroup-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=F3+hMbm3cTSXugM51pLIqBXjw+p/nBjYEDyQ0bPg38A=; b=RIIsciaqtHv89vfFkbm8sphZHoyKq5m0d+UDKHZ/zZ/vIjKREFTG3humfrce/cHmK58vrtMxvlP3c/T28wV+JSzYT4/S45kCQ2c65bo/AhC2DiW7fzb/jVuFoI2tIHugqMNrFLs4Gia630TlE+xa58UXqHI3RWMHfxi7tM/DbGQ= Received: from GV3P280CA0003.SWEP280.PROD.OUTLOOK.COM (2603:10a6:150:b::28) by DU2PR07MB8152.eurprd07.prod.outlook.com (2603:10a6:10:275::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5676.7; Fri, 23 Sep 2022 10:51:59 +0000 Received: from HE1EUR02FT003.eop-EUR02.prod.protection.outlook.com (2603:10a6:150:b:cafe::6e) by GV3P280CA0003.outlook.office365.com (2603:10a6:150:b::28) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5654.14 via Frontend Transport; Fri, 23 Sep 2022 10:51:59 +0000 X-MS-Exchange-Authentication-Results: spf=fail (sender IP is 217.111.95.7) smtp.mailfrom=arri.de; dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=arri.de; Received-SPF: Fail (protection.outlook.com: domain of arri.de does not designate 217.111.95.7 as permitted sender) receiver=protection.outlook.com; client-ip=217.111.95.7; helo=mta.arri.de; Received: from mta.arri.de (217.111.95.7) by HE1EUR02FT003.mail.protection.outlook.com (10.152.10.98) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.20.5654.14 via Frontend Transport; Fri, 23 Sep 2022 10:51:58 +0000 Received: from N95HX1G2.arri.de (192.168.54.71) by mta.arri.de (10.10.18.5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256) id 15.1.2375.24; Fri, 23 Sep 2022 12:51:57 +0200 From: Christian Eggers To: CC: Christian Eggers Subject: [PATCH BlueZ 3/3] tools: fix printf format strings Date: Fri, 23 Sep 2022 12:51:41 +0200 Message-ID: <20220923105141.20176-3-ceggers@arri.de> X-Mailer: git-send-email 2.35.3 In-Reply-To: <20220923105141.20176-1-ceggers@arri.de> References: <20220923105141.20176-1-ceggers@arri.de> MIME-Version: 1.0 X-Originating-IP: [192.168.54.71] X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: HE1EUR02FT003:EE_|DU2PR07MB8152:EE_ X-MS-Office365-Filtering-Correlation-Id: 9e9929d2-fadb-4186-a7c4-08da9d51a393 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: I4ppycmGtSF1wVHXUa9jt/1a1NVz7lj6T5U5NB+LqmW0d9YDrEUO3vMztLVdh0ouMxIoPc5wgbhjhh7XSUYLCWGeogyoKm97sYnSjidyn9qGKHgoPKJZkmhPj+epTkLxDIpJKSu1w3tOwwyGQOx52FgftdTLt4h0bv7zxyGzpxoi27ffonXlCuqDjHpyTIUOJjHlAuNsDdKvVnGoeW9V0Eq/ppue4mBnM1HLhQzrCfg8xXIICqXSVARZpDixaGFjBGfdZj/iEkOqLTJNKQ2c9R5Y3I/Fu9D+e+97/5dASj4JoKYG4J6mes0QvZEy7HyE11RQBnRyHgD3DXfAQ9kGC6TLV0HMTF8tLbxGSYo+8/DOi8CQ11X2U/SunvFO8zdpJlzEo/PRH4axpEBz7UK5SkKhdjAauJ/HLzULUvy2uLqzUqLerybb+WKb7cZerM0YClbm3peLn1j7ovZYQcrnLkMY+okZU8NXsdc9zlsYcGoMyyxfRnakXf8X2qK+gaXIGkNoVsiWiZpsAlqUBu0cPoSWzWK5anPnGUvPhByQP2u0uAF1TVG45iEs7vFjPjXNHHT8Imllj+QVo6dWVCjIglx9dlV7CEBAk01bFuiV+56vLBXtrK7R5bK6fzJT3LmH73dpgFfA6VCftZUowH2MoT44JfpERr7a34oVciRUOEfQA1SHLC3uUzfyhQMYOlb6QPbeUGC19ah9qvrCxdlGEVC5KSzlAQ6SmoqG40f4IzrqMbcPOQ1S7Qv4s7ELjCb6GDHjLwtIKIJ9kWsMBIe9Wg== X-Forefront-Antispam-Report: CIP:217.111.95.7;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:mta.arri.de;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(346002)(136003)(376002)(396003)(39860400002)(451199015)(46966006)(36840700001)(82740400003)(26005)(86362001)(4326008)(8676002)(6916009)(36756003)(41300700001)(426003)(70586007)(82310400005)(356005)(316002)(5660300002)(4744005)(2906002)(8936002)(47076005)(83380400001)(81166007)(6666004)(7696005)(107886003)(478600001)(70206006)(16526019)(186003)(36860700001)(2616005)(1076003)(336012)(40480700001)(36900700001);DIR:OUT;SFP:1102; X-OriginatorOrg: arri.de X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Sep 2022 10:51:58.7840 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9e9929d2-fadb-4186-a7c4-08da9d51a393 X-MS-Exchange-CrossTenant-Id: e6a73a5a-614d-4c51-b3e3-53b660a9433a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=e6a73a5a-614d-4c51-b3e3-53b660a9433a;Ip=[217.111.95.7];Helo=[mta.arri.de] X-MS-Exchange-CrossTenant-AuthSource: HE1EUR02FT003.eop-EUR02.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR07MB8152 Precedence: bulk List-ID: X-Mailing-List: linux-bluetooth@vger.kernel.org time_t is 64 bit (long long) on many 32 bit platforms (e.g. ARM) now --- tools/l2test.c | 5 +++-- tools/rctest.c | 5 +++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/l2test.c b/tools/l2test.c index fbaca747eaaa..5aae4b687518 100644 --- a/tools/l2test.c +++ b/tools/l2test.c @@ -893,8 +893,9 @@ static void recv_mode(int sk) timestamp = 0; memset(ts, 0, sizeof(ts)); } else { - sprintf(ts, "[%ld.%ld] ", - tv.tv_sec, tv.tv_usec); + sprintf(ts, "[%lld.%lld] ", + (long long)tv.tv_sec, + (long long)tv.tv_usec); } } diff --git a/tools/rctest.c b/tools/rctest.c index 9eb8210d6eb2..269503701e6b 100644 --- a/tools/rctest.c +++ b/tools/rctest.c @@ -500,8 +500,9 @@ static void recv_mode(int sk) timestamp = 0; memset(ts, 0, sizeof(ts)); } else { - sprintf(ts, "[%ld.%ld] ", - tv.tv_sec, tv.tv_usec); + sprintf(ts, "[%lld.%lld] ", + (long long)tv.tv_sec, + (long long)tv.tv_usec); } }