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 9A8FCA0547; Wed, 21 Apr 2021 12:07:24 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 88311419EC; Wed, 21 Apr 2021 12:07:24 +0200 (CEST) Received: from NAM10-DM6-obe.outbound.protection.outlook.com (mail-dm6nam10on2057.outbound.protection.outlook.com [40.107.93.57]) by mails.dpdk.org (Postfix) with ESMTP id 5A068419D3 for ; Wed, 21 Apr 2021 12:07:23 +0200 (CEST) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=MwGDza4YKf441qrJodERVgSA6NIFhwEGA04ZfLtd/NqspYHo+zVpIqCgbxeuStNFN6we3Jol5wAxLcNHZmMtYmyg6VqSQ/Jzjg3sB0C9/EvO+faBYwmqnubv4AwS9QS51BhEl17n8tHs1NbG5s4PmvAUomvXqagFcG4xUz5iu1NvsCs/gPS8DA9lK5e59J8ZrW3Z+iRpNuKaAoy93Q8I1+l7XBZwjvFTBdXvbpbFbR2aB1kKmaUSBZEESUUng+pviWMseDsqQCe2u68L24+kSkvXkn2wHvQswd4kPsIikvacgXWKFImeAA9w0d7MEPGxYKd1CdzdX9ErN3H35OOlEQ== 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=ktkOqowamjiClOokBNJKmI7ODQwEMmjN6BlgYRk1tUk=; b=JReTxEaMAxuIUZY5E/CSlIbCkeD3kNqunJcS6yvPPs6AfwDePJKWOxtEOlP+NCIfz/b1dGYYos/Z5klBsFTjCyYdDrAHHb0jJeCDMdmKRdwdUQjy8IVg1Vn8VqTbXiSgekPw6nzT5nMQDuU8zILDlZxu6VjjiNyTOdTkKkFRay8pSg9FZkD4LJkZyWp0g6XHExrKsc8pS8/Re8R+uMxor1NbVb+B2FjqnQ6b7bnsljOaps75XOZkES8n3g3EWCeLBnGxYu5KDtxPulyqF1nfbMR/U+ONeur+1LaOjOIvrwSVqeQaENvGKXLQHfUCuzBfYB7fgwbZaEelR9Znwfzb7w== 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=ktkOqowamjiClOokBNJKmI7ODQwEMmjN6BlgYRk1tUk=; b=fATuRALXL2Rqsf2mV8suOHPjBxKiIH6CHzUst8LCV4wwYwWHRLYHdzeglK30URj2v43hmHJpbMIJPAowqs2FjVKeGq6ehMXvmgBSnIEVE/uihiYEFldFz/bO4Le5XIYu7s0JTBYlXNclj4A68fmPzOJy97lRTnJl+c9Ll8gQ131fIxbVsh8+0WsvSolItAZUHZsgbsLh2UbBkYoEZXuM1rwRAJZDlvo3uMu5tsdULOAw3MDwYLdpyeJOkQDuQyQ15DCmiImTTAToMqNbGpnhl7/QN9g/UaMt3vFyPAnKEi/e64rzK/33NFQ6o5ssFi2KQ55y8uzxBw03aXbjJFR91g== Received: from DM5PR07CA0025.namprd07.prod.outlook.com (2603:10b6:3:16::11) by DM6PR12MB3721.namprd12.prod.outlook.com (2603:10b6:5:1c2::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4042.18; Wed, 21 Apr 2021 10:07:22 +0000 Received: from DM6NAM11FT028.eop-nam11.prod.protection.outlook.com (2603:10b6:3:16:cafe::66) by DM5PR07CA0025.outlook.office365.com (2603:10b6:3:16::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.4065.20 via Frontend Transport; Wed, 21 Apr 2021 10:07:22 +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 DM6NAM11FT028.mail.protection.outlook.com (10.13.173.140) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384) id 15.20.4065.21 via Frontend Transport; Wed, 21 Apr 2021 10:07:21 +0000 Received: from nvidia.com (172.20.145.6) by HQMAIL107.nvidia.com (172.20.187.13) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Wed, 21 Apr 2021 10:07:20 +0000 From: Ali Alnubani To: CC: Date: Wed, 21 Apr 2021 13:06:38 +0300 Message-ID: <20210421100638.19451-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.145.6] X-ClientProxiedBy: HQMAIL107.nvidia.com (172.20.187.13) To HQMAIL107.nvidia.com (172.20.187.13) X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: b1691dc0-97ca-4571-795c-08d904ad412d X-MS-TrafficTypeDiagnostic: DM6PR12MB3721: X-Microsoft-Antispam-PRVS: X-MS-Exchange-Transport-Forked: True X-MS-Oob-TLC-OOBClassifiers: OLM:5236; X-MS-Exchange-SenderADCheck: 1 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: zXiIHDWLY5TAHap9UQT4XetYp/nvAxB2zCpDLC9a0C4a2jkVXhWXnXOKlMvD3VmRSf9K2ZgJqbKdztNl1K7DtWEZ8VyLRTk90f5fcq10Vvn+vEUeyBio/QtMYcJFS/panI2OBmnaUeA5XK2UxxREB/SiB0MSLEXWNvsWLw/U26aSWVOL2KTb279ostB8CRU7PvMa3IE2DHPrescDZLSF/oEWcEr1seiHkHln3WAYIvJAINp71rcgswTev1uVXjolGhgnkgdFEQksn5DBp6p4Hj1QcDOVEiBAKOnTapF6IrBOZIdqglXJEx9jo0lq1lv/OYP/WhasBVKoeuywpwI/GuQC9HRgMpSsi2NZ8gUi8dlJZdKBc3UizlBUwh5+FI+M7n8FqmdCfCI6nz+XntbwiYZahlZkX4vB0EvVkPaMaLo+0QUOCnsVhpGTz7rMLAUP+VMAABMHTOJzjRs2PA3p0eQeOTGrEg+0aXWx2BkrGLnWgJdWt4l/QgODJWGGvQ84J+zFPGjHLXFRzGuQF4olmQ2Bc9ePRSbVNK+wCxq+9d3qT9+hDops+yLd/Dq+qBM/rO3Hiqo2hKJ7s0/gufh8TpJY+r0b7hs9WIdcoaKOocBheaRvkh3pJ4vsVA5fKAbkncZb/RkFfOoftd98pyjsvA== 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)(396003)(346002)(136003)(39860400002)(376002)(36840700001)(46966006)(26005)(36756003)(2616005)(86362001)(55016002)(70586007)(47076005)(8936002)(82740400003)(82310400003)(426003)(70206006)(4326008)(6916009)(336012)(478600001)(16526019)(6286002)(356005)(2906002)(6666004)(36860700001)(83380400001)(36906005)(186003)(7636003)(316002)(1076003)(5660300002)(7696005)(8676002); DIR:OUT; SFP:1101; X-OriginatorOrg: Nvidia.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Apr 2021 10:07:21.7958 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: b1691dc0-97ca-4571-795c-08d904ad412d 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: DM6NAM11FT028.eop-nam11.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB3721 Subject: [dpdk-dev] [PATCH] pipeline: fix build with gcc 4.8.5 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" Compilation on CentOS 7 with gcc version 4.8.5 fails with the following errors: ``` ... error: 'src_struct_id' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... error: 'dst_struct_id' may be used uninitialized in this function [-Werror=maybe-uninitialized] ... ``` This patch fixes the build errors by initializing both variables. Bugzilla ID: 683 Fixes: 783768136f29 ("pipeline: auto-detect endianness of action arguments") Cc: cristian.dumitrescu@intel.com Signed-off-by: Ali Alnubani --- lib/librte_pipeline/rte_swx_pipeline.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/lib/librte_pipeline/rte_swx_pipeline.c b/lib/librte_pipeline/rte_swx_pipeline.c index 4e358bbda4..a2732a1e57 100644 --- a/lib/librte_pipeline/rte_swx_pipeline.c +++ b/lib/librte_pipeline/rte_swx_pipeline.c @@ -3624,7 +3624,7 @@ instr_mov_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -3889,7 +3889,7 @@ instr_alu_add_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -3942,7 +3942,7 @@ instr_alu_sub_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -4072,7 +4072,7 @@ instr_alu_shl_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -4125,7 +4125,7 @@ instr_alu_shr_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -4178,7 +4178,7 @@ instr_alu_and_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -4231,7 +4231,7 @@ instr_alu_or_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); @@ -4284,7 +4284,7 @@ instr_alu_xor_translate(struct rte_swx_pipeline *p, char *dst = tokens[1], *src = tokens[2]; struct field *fdst, *fsrc; uint64_t src_val; - uint32_t dst_struct_id, src_struct_id; + uint32_t dst_struct_id = 0, src_struct_id = 0; CHECK(n_tokens == 3, EINVAL); -- 2.25.1