From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wi0-f173.google.com (mail-wi0-f173.google.com [209.85.212.173]) by dpdk.org (Postfix) with ESMTP id 0DC327E1B for ; Fri, 5 Dec 2014 10:25:06 +0100 (CET) Received: by mail-wi0-f173.google.com with SMTP id r20so777659wiv.6 for ; Fri, 05 Dec 2014 01:25:05 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:organization :user-agent:in-reply-to:references:mime-version :content-transfer-encoding:content-type; bh=P7SouaLXNeFv8AKRE7LL6sah8p0TxoDqaBWlrZzEaLg=; b=jcro+AcZD1IaQdiUBuGfu+/0LuPPq540BBzlNPUesqsGNC4W1Qf8mpTopIxWkbDeTf 02VPHTT88dUDKdFIsclSx1GBmbNBZqLT8PO2TLod2g2xcdVD+HcQNcfBUifCaB26Qnu7 ELU3Ukkfw2F4VnuW14uS5Foxmpo6Y10Fn7FrPJ5ahbMI/rzTWhMA4GaEQSDa/XUT+SWf mxu1/c1LMGftAmQJOAJRpmNnIJaU4HyNMl3AIWaXBGgsNn586+inTLcEhD2pJXsItUw3 Un9KiDHsxEHDcLn2kWIexdc9IA1r9XXZQ76kMhD9ZQQRokWJusNdGs0ogK+jMcCuTnKN CD3Q== X-Gm-Message-State: ALoCoQm8OfmyknAzaWr0piH7xANyENssiNOi5VdjdfVW0eY0X9rtajvMS/Xw1o1zORYHK2T5/PZ4 X-Received: by 10.180.208.69 with SMTP id mc5mr2660423wic.25.1417771505868; Fri, 05 Dec 2014 01:25:05 -0800 (PST) Received: from xps13.localnet (136-92-190-109.dsl.ovh.fr. [109.190.92.136]) by mx.google.com with ESMTPSA id l10sm1458399wif.20.2014.12.05.01.25.04 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 05 Dec 2014 01:25:05 -0800 (PST) From: Thomas Monjalon To: "Qiu, Michael" Date: Fri, 05 Dec 2014 10:24:40 +0100 Message-ID: <1711291.egEY51Wr4d@xps13> Organization: 6WIND User-Agent: KMail/4.14.3 (Linux/3.17.4-1-ARCH; KDE/4.14.3; x86_64; ; ) In-Reply-To: <533710CFB86FA344BFBF2D6802E60286C9CFE5@SHSMSX101.ccr.corp.intel.com> References: <1417663711-19576-1-git-send-email-michael.qiu@intel.com> <1417666564-19950-1-git-send-email-michael.qiu@intel.com> <533710CFB86FA344BFBF2D6802E60286C9CFE5@SHSMSX101.ccr.corp.intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Cc: dev@dpdk.org Subject: Re: [dpdk-dev] [PATCH v3] test-pmd: Fix pointer aliasing error 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: Fri, 05 Dec 2014 09:25:06 -0000 2014-12-05 05:34, Qiu, Michael: > Any comments about this version? a new workaround solution :) Yes, one comment: I think it's ugly :) These aliasing errors are not reliable so I think we can disable it (like Linux does). But in case you don't want to disable the warning, please add a comment to your workaround to explain it is caused by GCC strict-aliasing check. > > - const uint16_t *u16 = (const uint16_t *)buf; > > + uintptr_t ptr = (uintptr_t)buf; > > + const uint16_t *u16 = (const uint16_t *)ptr; Thanks -- Thomas