From patchwork Tue Sep 5 13:03:33 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Van Haaren, Harry" X-Patchwork-Id: 28378 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id 7CFD92BAF; Tue, 5 Sep 2017 15:03:30 +0200 (CEST) Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) by dpdk.org (Postfix) with ESMTP id 307F72B8B for ; Tue, 5 Sep 2017 15:03:28 +0200 (CEST) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 05 Sep 2017 06:03:27 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.41,480,1498546800"; d="scan'208";a="897232739" Received: from silpixa00398672.ir.intel.com ([10.237.223.128]) by FMSMGA003.fm.intel.com with ESMTP; 05 Sep 2017 06:03:26 -0700 From: Harry van Haaren To: dev@dpdk.org Cc: Harry van Haaren Date: Tue, 5 Sep 2017 14:03:33 +0100 Message-Id: <1504616613-46803-1-git-send-email-harry.van.haaren@intel.com> X-Mailer: git-send-email 2.7.4 Subject: [dpdk-dev] [PATCH] buildtools: zero elf info variable in pmdinfogen X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 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 commit zeros out the elf_info struct at startup of the pmdinfogen code. If it is not zeroed, later in the code gcc produces "may be unused" prints. Clang does not report any issue. This commit enables a simplification in the meson build system, removing the requirement for "-Wno-maybe-uninitialized". Signed-off-by: Harry van Haaren --- buildtools/pmdinfogen/pmdinfogen.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/buildtools/pmdinfogen/pmdinfogen.c b/buildtools/pmdinfogen/pmdinfogen.c index ba1a12e..e73fc76 100644 --- a/buildtools/pmdinfogen/pmdinfogen.c +++ b/buildtools/pmdinfogen/pmdinfogen.c @@ -397,7 +397,7 @@ static void output_pmd_info_string(struct elf_info *info, char *outfile) int main(int argc, char **argv) { - struct elf_info info; + struct elf_info info = {0}; int rc = 1; if (argc < 3) {