From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id DF040A0C50; Mon, 12 Jul 2021 09:47:37 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id A351E4069E; Mon, 12 Jul 2021 09:47:37 +0200 (CEST) Received: from AZHDRRW-EX01.nvidia.com (azhdrrw-ex01.nvidia.com [20.51.104.162]) by mails.dpdk.org (Postfix) with ESMTP id 225A640685 for ; Mon, 12 Jul 2021 09:47:36 +0200 (CEST) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (104.47.58.174) by mxs.oss.nvidia.com (10.13.234.36) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.858.12; Mon, 12 Jul 2021 00:47:35 -0700 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=oJdhinv/ZCa0w/+HTUCnkIKFyoayWYUXXWHMtoLcTeco/z1BKRA3rDAYjrvjkd8MEu5cD5YfgJlMfmqnsTZEdtRG6WiBXNrajZizmhsShfBqsH2fO9B87kq0U4zuEeYQGS8gwxSFIWaDImM2L4r89+aoAhQD3AwACwA/z292berSYgaCesGPs/B8K9dULdDj3847NeoFYcs7gSpYJCaiviRc3TNzSz0niOH7xtQ1WnCom0R7B4eQjlrWLZLBhLrKtawYsmj5+Y0v7Z14eCHNz5m139hcCYjf31u7YCpvKv2d1vez/JR0FQWbEYxz3OiOrv+5cxvkCRic0ZRz24F4jg== 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-SenderADCheck; bh=dioOdgl6iToEpKNE9G4r+MplN/HgEVBtn0LmwTeIWZM=; b=KeqaojuyGTqwLxBXl7iLhl3ZrWovfv7DGN71p8gIcWOMRH4qEf8AuKwg+4Hsjot5E23qg94OEHwgZP7bIaOmLr0JCTpZ2biXKE4UG3PG4T5w0muaraAUUrT/UlJ09f0xhOcihtws9mmNhJ/DAKvE7E/EB+SipjAZ975z4aTppHwAGCxR/EYkje9/Re8oKYLeeMAqloFIB4M4S9iDrn4BeprRkSnUaJ+MSXJp79zp3LZxCUcgIE0Fxocx6JehDVd77gnQIRDqF1KkaBWxg0gJZlOjPLKPLSCj5beoudcs04yCYW/92ZoFtL+Z3rVDCP0gJmySt7gQZlMYBGrYZ7FsNg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 216.228.112.34) smtp.rcpttodomain=intel.com smtp.mailfrom=nvidia.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=nvidia.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=Nvidia.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=dioOdgl6iToEpKNE9G4r+MplN/HgEVBtn0LmwTeIWZM=; b=lemi8r8WrJL4X/IxnlsV5uRoFUsjw6qe1LruQPXBLqwHIfVOSzcOIf9gBtGalfwR0PwApXXMjmEDfVnSFDUUSc8xd+b8Z/yKlRLuyAaFIlAKkAoXoaW1+ifBU9jmlUSjS/WkpNYobTTWshQzfsP0sasYVbg1nra00mlMA1ShWZbhTlaxcsccDfMMwXrk69nWgQy51I2fNtBDxBlu1bwR/vGs2XDyv6phpjlaYCX+LYnWfPjDe5PHWK1tlln4QTe28R+FCikrOdKcn7PWuPlJHOWUtRrdVAxE5+C94rCi4e3xXhFnJvBeonAHH8/IRVtzbrPrvU/43Ru9+WRTK5CyrA== Received: from DM5PR13CA0031.namprd13.prod.outlook.com (2603:10b6:3:7b::17) by CH2PR12MB3671.namprd12.prod.outlook.com (2603:10b6:610:23::16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4308.23; Mon, 12 Jul 2021 07:47:31 +0000 Received: from DM6NAM11FT045.eop-nam11.prod.protection.outlook.com (2603:10b6:3:7b:cafe::50) by DM5PR13CA0031.outlook.office365.com (2603:10b6:3:7b::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4331.11 via Frontend Transport; Mon, 12 Jul 2021 07:47:31 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 216.228.112.34) smtp.mailfrom=nvidia.com; intel.com; dkim=none (message not signed) header.d=none;intel.com; dmarc=pass action=none header.from=nvidia.com; Received-SPF: Pass (protection.outlook.com: domain of nvidia.com designates 216.228.112.34 as permitted sender) receiver=protection.outlook.com; client-ip=216.228.112.34; helo=mail.nvidia.com; Received: from mail.nvidia.com (216.228.112.34) by DM6NAM11FT045.mail.protection.outlook.com (10.13.173.123) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4308.20 via Frontend Transport; Mon, 12 Jul 2021 07:47:31 +0000 Received: from nvidia.com (172.20.187.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Mon, 12 Jul 2021 07:47:29 +0000 From: Ali Alnubani To: CC: , , Date: Mon, 12 Jul 2021 10:46:36 +0300 Message-ID: <20210712074636.406903-1-alialnu@nvidia.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-Originating-IP: [172.20.187.6] X-ClientProxiedBy: HQMAIL111.nvidia.com (172.20.187.18) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: f60a5f25-9c75-4bf4-4a4d-08d945094df6 X-MS-TrafficTypeDiagnostic: CH2PR12MB3671: X-LD-Processed: 43083d15-7273-40c1-b7db-39efd9ccc17a,ExtAddr X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:8882; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: YB6ypYJ5VJ7R/BaOQuxrsx8XEvToIkiHG3wu72aeuef3MkXKWSndQirhEJcmkoKwe/kWlpLJohzDKJSquV9wHLWwc2tgrUMb+h2EiZGnJLCiKg0NqG50ErhzZHcJCIhZVqosbJzTFu60ZB4ZoOrM7d3FggEStU1apfbvh4D+8yqHWlUWiSpDzu9TQ/dDsrX588UlN0NjKDr+lJ2Vw8m2+f6zLJnEP2PhoWuhJ1p2EKxVqDa55Al9F9hGEeH2nYBmXyRJEbaqlq9v89Ne8oFaZx4q6N5ffm0LiMneWEf/JjvonbmBSiMC6McmM52uR22Zq3JD9QhWMMVHwyBjh+2Q0/DBDFqu9Zh6dvvpyKs3dzja27i/qExxVxokRAqUZoVRaYmfLI7Mo9682Lm86wxgGfGSuZMKfmh14KrIApd1G79S8rtancEvH5F2dpMZ6OFAXP5YZCa2aa86h822oKfLDHEFS4VuiWg1c3SF/AHIh6XuyQeVgR1cDaQGkTLynz9Zm3tjiNU811jfuiGR8WZ7UzKB89/Q+8czdJo0uv72T1bwbh7HEOSNdjxDmcohUpcysK19lN+ckLp5eH1r3pH1vyz9Tt4VM3xTF9MHzpTZz8tNwqRCe5XuukMAZjCh3gKg8EX852jc4ayLdleNlaXMv+bFzRLDtRIrMHPS2BUEwelNeJhEkEs7FPG/tJu5KkEaDjgNxU+TfKO68E72lCmmjBZbaE3f7AZi0J8BCa38ts8= X-Forefront-Antispam-Report: CIP:216.228.112.34; CTRY:US; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:mail.nvidia.com; PTR:schybrid03.nvidia.com; CAT:NONE; SFS:(4636009)(39860400002)(376002)(396003)(136003)(346002)(36840700001)(46966006)(36906005)(70206006)(5660300002)(55016002)(7696005)(82310400003)(86362001)(47076005)(107886003)(316002)(7636003)(356005)(8676002)(2616005)(6666004)(186003)(478600001)(26005)(70586007)(6916009)(1076003)(426003)(336012)(54906003)(4326008)(34020700004)(82740400003)(16526019)(83380400001)(8936002)(36756003)(36860700001)(6286002)(2906002); DIR:OUT; SFP:1101; X-MS-Exchange-CrossTenant-OriginalArrivalTime: 12 Jul 2021 07:47:31.3615 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: f60a5f25-9c75-4bf4-4a4d-08d945094df6 X-MS-Exchange-CrossTenant-Id: 43083d15-7273-40c1-b7db-39efd9ccc17a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=43083d15-7273-40c1-b7db-39efd9ccc17a; Ip=[216.228.112.34]; Helo=[mail.nvidia.com] X-MS-Exchange-CrossTenant-AuthSource: DM6NAM11FT045.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: CH2PR12MB3671 Subject: [dpdk-dev] [PATCH] examples/pipeline: fix build X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" This patch fixes the following build failures seen on Ubuntu 16.04 with gcc 5.4.0 because of uninitialized variables: ... examples/pipeline/cli.c:1559:11: error: 'weight_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:1545:13: error: 'member_id_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:1538:12: error: 'group_id_val' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2189:2: error: 'idx1' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2179:43: error: 'idx0' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2265:2: error: 'idx1' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2248:43: error: 'idx0' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2358:2: error: 'idx1' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... examples/pipeline/cli.c:2325:43: error: 'idx0' may be used uninitialized in this function [-Werror=maybe-uninitialized] Fixes: 598fe0dd0d8e ("examples/pipeline: support selector table") Cc: cristian.dumitrescu@intel.com Signed-off-by: Ali Alnubani --- examples/pipeline/cli.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/pipeline/cli.c b/examples/pipeline/cli.c index f67783c8fa..bf32efa212 100644 --- a/examples/pipeline/cli.c +++ b/examples/pipeline/cli.c @@ -1491,7 +1491,7 @@ pipeline_selector_group_member_read(const char *string, { char *token_array[GROUP_MEMBER_INFO_TOKENS_MAX], **tokens; char *s0 = NULL, *s; - uint32_t n_tokens = 0, group_id_val, member_id_val, weight_val; + uint32_t n_tokens = 0, group_id_val = 0, member_id_val = 0, weight_val = 0; int blank_or_comment = 0; /* Check input arguments. */ @@ -2141,7 +2141,7 @@ cmd_pipeline_meter_reset(char **tokens, { struct pipeline *p; const char *name; - uint32_t idx0, idx1; + uint32_t idx0 = 0, idx1 = 0; if (n_tokens != 9) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); @@ -2210,7 +2210,7 @@ cmd_pipeline_meter_set(char **tokens, { struct pipeline *p; const char *name, *profile_name; - uint32_t idx0, idx1; + uint32_t idx0 = 0, idx1 = 0; if (n_tokens != 11) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); @@ -2287,7 +2287,7 @@ cmd_pipeline_meter_stats(char **tokens, struct rte_swx_ctl_meter_stats stats; struct pipeline *p; const char *name; - uint32_t idx0, idx1; + uint32_t idx0 = 0, idx1 = 0; if (n_tokens != 9) { snprintf(out, out_size, MSG_ARG_MISMATCH, tokens[0]); -- 2.25.1