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 50B8FA050D for ; Wed, 30 Mar 2022 16:12:29 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 322F24013F; Wed, 30 Mar 2022 16:12:29 +0200 (CEST) Received: from mail-ed1-f41.google.com (mail-ed1-f41.google.com [209.85.208.41]) by mails.dpdk.org (Postfix) with ESMTP id 383874013F for ; Wed, 30 Mar 2022 16:12:28 +0200 (CEST) Received: by mail-ed1-f41.google.com with SMTP id y10so24557582edv.7 for ; Wed, 30 Mar 2022 07:12:28 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=5LJlH5V3DZA5q2TLzkcr4Sqyb0IULFZ9ZUNiTcCNiMA=; b=fZv3Btk0Z7Izi/b3B7Fld5bh1RDhPTmqRCFw6ohLyINKhPjaNBpBh8qrsDVF0bC2SV vj7Hr+5n+vEHc9LMmtoVYhnUZYZfVpsX0M7Yh2EcM2DBjhCEOgGjKgagZCzw/wm3PQMU ++8QxgSAChs9PLei4v6nqDkcpG1+mT7+pUtTVkCkIRDYMx/F0IrkkcXz3zmd4oVK6FKW xlxfmqN4o1+EvQMFTWGS4flUGSlE/qNveJinGclNg3GUBGuZkxxwZrcm5M/JbUvchmXV s0GZ8NQMOI3uGyCVwH6Q7AT0gmcBvkbeChH2jafPMyS2nkv5xkcsxqYQPRq2ibt18P12 QntA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=5LJlH5V3DZA5q2TLzkcr4Sqyb0IULFZ9ZUNiTcCNiMA=; b=RLd3L+PxRohLtZ6Y2ANFmOdaHYQ3/7b5rC5J0mh3yFdIKPXu243GxMe03J2LOEfCl4 sJfs2R9u/BE4bfTcVAWyqCxsHTXc40fX+2mbuhTeTa+HVB569IEt9rw9Yv/s7TsHRpul t9Id8TRoq33mP9XfWiVD0dhku3VWswMB1DLf6SBk3s5mDc/odHRTG/GlJwbmHKcH+iEU GRHgTOQD73HJcYS7U/aVD8pilx/NnVf7/JgYjuKxzrFe2u8dlljUnU0mi60WUXo1SfZi ylObcofbQQrpecpM0pwzlbglwNZb2QFw9j2YmaKRIcWoIIPjb2Ior/Zq0mbaE72cArJw zqWQ== X-Gm-Message-State: AOAM533aevncd7rSaaJ0grl5HyOy9JMWopmdWe5aANXIn8XmyxDsHMrg 8PKnyL4eUtrfmYknrdqQ5NXvHIr6pkencQ== X-Google-Smtp-Source: ABdhPJxj7W1LbZaMieBmxYTX3a7rzJKM0dpCQ+GxI3JGuqZpVOA9AJIZpDYpD6f5O0ynh05VwB/Rqg== X-Received: by 2002:a05:6402:280f:b0:419:4c6f:a91b with SMTP id h15-20020a056402280f00b004194c6fa91bmr10747127ede.84.1648649547571; Wed, 30 Mar 2022 07:12:27 -0700 (PDT) Received: from localhost ([2a01:4b00:f41a:3600:360b:9754:2e3a:c344]) by smtp.gmail.com with ESMTPSA id j17-20020a05640211d100b00419357a2647sm10221115edw.25.2022.03.30.07.12.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 30 Mar 2022 07:12:27 -0700 (PDT) From: luca.boccassi@gmail.com To: stable@dpdk.org Cc: christian.ehrhardt@canonical.com, Luca Boccassi Subject: [PATCH 19.11 20.11 v2] pmdinfogen: fix compilation with Clang 3.4.2 on CentOS 7 Date: Wed, 30 Mar 2022 15:12:13 +0100 Message-Id: <20220330141213.349257-1-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220330121225.322838-1-luca.boccassi@gmail.com> References: <20220330121225.322838-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org From: Luca Boccassi $ meson --werror --buildtype=debugoptimized build && ninja-build -C build [..] [5/2516] Compiling C object buildtools/pmdinfogen/pmdinfogen.p/pmdinfogen.c.o FAILED: buildtools/pmdinfogen/pmdinfogen.p/pmdinfogen.c.o clang -Ibuildtools/pmdinfogen/pmdinfogen.p -Ibuildtools/pmdinfogen -I../../root/dpdk/buildtools/pmdinfogen -I. -I../../root/dpdk -Iconfig -I../../root/dpdk/config -Ilib/librte_eal/include -I../../root/dpdk/lib/librte_eal/include -Ilib/librte_eal/linux/include -I../../root/dpdk/lib/librte_eal/linux/include -Ilib/librte_eal/x86/include -I../../root/dpdk/lib/librte_eal/x86/include -Ilib/librte_pci -I../../root/dpdk/lib/librte_pci -Xclang -fcolor-diagnostics -pipe -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -Werror -O2 -g -MD -MQ buildtools/pmdinfogen/pmdinfogen.p/pmdinfogen.c.o -MF buildtools/pmdinfogen/pmdinfogen.p/pmdinfogen.c.o.d -o buildtools/pmdinfogen/pmdinfogen.p/pmdinfogen.c.o -c ../../root/dpdk/buildtools/pmdinfogen/pmdinfogen.c ../../root/dpdk/buildtools/pmdinfogen/pmdinfogen.c:431:27: error: missing field 'hdr' initializer [-Werror,-Wmissing-field-initializers] struct elf_info info = {0}; ^ 1 error generated. [..] Use memset instead. Bugzilla ID: 984 Fixes: 0decf84217f1 ("buildtools: zero elf info variable in pmdinfogen") Signed-off-by: Luca Boccassi Reviewed-by: Christian Ehrhardt --- structured init broke old gcc 4, switch to memset buildtools/pmdinfogen/pmdinfogen.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c index a68d1ea999..f7133267be 100644 --- a/buildtools/pmdinfogen/pmdinfogen.c +++ b/buildtools/pmdinfogen/pmdinfogen.c @@ -428,7 +428,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile) int main(int argc, char **argv) { - struct elf_info info = {0}; + struct elf_info info; int rc = 1; if (argc < 3) { @@ -437,6 +437,7 @@ int main(int argc, char **argv) basename(argv[0])); exit(127); } + memset(&info, 0, sizeof(struct elf_info)); use_stdin = !strcmp(argv[1], "-"); use_stdout = !strcmp(argv[2], "-"); parse_elf(&info, argv[1]); -- 2.34.1