From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f172.google.com (mail-wi0-f172.google.com [209.85.212.172]) by dpdk.org (Postfix) with ESMTP id 12B10FFA for ; Thu, 16 Apr 2015 11:35:46 +0200 (CEST) Received: by widjs5 with SMTP id js5so7294610wid.1 for ; Thu, 16 Apr 2015 02:35:46 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:date:from:user-agent:mime-version:to :cc:subject:references:in-reply-to:content-type :content-transfer-encoding; bh=nwBXJJHZTAF1swuS+Tk9Q85kx++lgCBCTrdc6Cr0o4w=; b=QIEZnN7ZDAh5BW7QtSXPzlrIimXWNiQmVs6MW+gZiTdDVqPMpJdHLpOFLIX93M57Kc ig1WT3zmlZmdn3QaA8eJZKHqMg8yk2NHmrOrOZ86mXGICZ5KrZuP/UjM3RDBSH4nuEAn cWzBLC8mUACzgDl01uekSTVRGefniiH2XZuNKTlTGc1izD+pnXej42pSubC2FoxYVUB+ YW/0gWuWQQjXf43FDWSdsSDy2Cw42b6nrYpdYGFwAECJ4qfsUzTY/2p3Br7h8dvAxk4P t5ZgRyF25wK94bhwOqo2UlcfyKcX2rxbmGABRzqraUypWeLFIj+0wQDrP04gIJNfRkqP +Mdw== X-Gm-Message-State: ALoCoQm7hEje8SSnFpgDoeTx0sfcicYllHSO1y3zWWgjzbxjgFGG4AHCdkXhJOt0SDmo7aIESUVC X-Received: by 10.180.91.76 with SMTP id cc12mr3514151wib.67.1429176945979; Thu, 16 Apr 2015 02:35:45 -0700 (PDT) Received: from [10.0.0.166] ([212.143.139.214]) by mx.google.com with ESMTPSA id kr5sm9588705wjc.1.2015.04.16.02.35.44 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 16 Apr 2015 02:35:45 -0700 (PDT) Message-ID: <552F826F.3050609@cloudius-systems.com> Date: Thu, 16 Apr 2015 12:35:43 +0300 From: Vlad Zolotarov User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0 MIME-Version: 1.0 To: Thomas Monjalon References: <1958525.YbKd0lDtje@xps13> <1429130956-17828-1-git-send-email-thomas.monjalon@6wind.com> <552F7D85.2090002@cloudius-systems.com> <1581903.SRNWASATZe@xps13> In-Reply-To: <1581903.SRNWASATZe@xps13> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v2 1/2] ixgbe: fix build with gcc 4.4 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Apr 2015 09:35:46 -0000 On 04/16/15 12:18, Thomas Monjalon wrote: > 2015-04-16 12:14, Vlad Zolotarov: >> On 04/15/15 23:49, Thomas Monjalon wrote: >>> The "may be used uninitialized" warning seems to be another GCC bug and is >>> workarounded with NULL initialization. >>> --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c >>> +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c >>> @@ -1476,8 +1476,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, >>> bool eop; >>> struct ixgbe_rx_entry *rxe; >>> struct ixgbe_rsc_entry *rsc_entry; >>> - struct ixgbe_rsc_entry *next_rsc_entry; >>> - struct ixgbe_rx_entry *next_rxe; >>> + struct ixgbe_rsc_entry *next_rsc_entry = NULL; >>> + struct ixgbe_rx_entry *next_rxe = NULL; >> -Wno-maybe-uninitialized ? > I prefer avoiding this flag for 2 reasons: > - It's not supported in every GCC versions (need special handling) Is it supported for 4.4? U don't have to support all ever existed gcc versions. ;) > - NULL assigment doesn't hurt Right, but still it's ugly since it's clear that it's a workaround - right above the patched ones there are variables that are not initialized and this discloses the workaround... ;) >