From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pb0-f46.google.com (mail-pb0-f46.google.com [209.85.160.46]) by dpdk.org (Postfix) with ESMTP id A1EC430E for ; Fri, 7 Mar 2014 19:13:01 +0100 (CET) Received: by mail-pb0-f46.google.com with SMTP id rq2so4457064pbb.5 for ; Fri, 07 Mar 2014 10:14:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:message-id:user-agent:date:from:to:cc:subject :references:content-disposition; bh=uZ6EPrj5X45qFwYiB8WD73T+q5fV7KQTNMKhwfXHbog=; b=I9MM79Rt6uQI/uKAL5AJiHDSwfDRakerLGklMeXBQJoWyM19I17w5dWlbfxvZqjM+Z 65+OS8USfFeqDXORR7D74AyaELuKbdzXX1fPyOsNtVH4X2cH/qO6tTChPbTqBK+CfTI0 bWFdGNSO3xVnUQzVx9Q31BEcsflv/uO+/HTI94NGOGBTXr7UK5HKmoO9jtFvCZbLAjIR T9oTdPXu6nd3HjTpWjrWKQCfYjXi/qPKsf4EUYwzU6rfCvYItJtVe9bGuBRL2Lx7a8qe 8prhs6VUCvpCwnZ57ee3uTn0oPZREv0Qp760+21zYGEmXY6tueOZwrvj+0cUIPgvtEPP OblA== X-Gm-Message-State: ALoCoQkTctdtcJrptv1a5CxIlp1MmuBBv/OBp4epCGceWOp8p78xQ7k58K7xdJ8L9BpMuEKie/v0 X-Received: by 10.68.241.73 with SMTP id wg9mr23724013pbc.62.1394216070082; Fri, 07 Mar 2014 10:14:30 -0800 (PST) Received: from localhost (static-50-53-83-51.bvtn.or.frontiernet.net. [50.53.83.51]) by mx.google.com with ESMTPSA id ei4sm39950290pbb.42.2014.03.07.10.14.28 for (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Fri, 07 Mar 2014 10:14:29 -0800 (PST) Message-Id: <20140307181427.254643901@vyatta.com> User-Agent: quilt/0.60-1 Date: Fri, 07 Mar 2014 10:13:39 -0800 From: Stephen Hemminger To: "Venkatesan, Venky" References: <20140307181335.024904493@vyatta.com> Content-Disposition: inline; filename=mempool-opts.patch Cc: dev@dpdk.org, Stephen Hemminger Subject: [dpdk-dev] [PATCH 4/6] mempool: use GCC push/pop 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, 07 Mar 2014 18:13:02 -0000 The include file should not change the GCC compile options for the whole file being compiled, but only for the one inline function that needs it. Using the push_options/pop_options fixes this. Signed-off-by: Stephen Hemminger --- a/lib/librte_mempool/rte_mempool.h 2014-01-23 09:15:55.000000000 -0800 +++ b/lib/librte_mempool/rte_mempool.h 2014-03-06 15:19:56.551238180 -0800 @@ -314,6 +314,7 @@ static inline void __mempool_write_trail */ #ifdef RTE_LIBRTE_MEMPOOL_DEBUG #ifndef __INTEL_COMPILER +#pragma GCC push_options #pragma GCC diagnostic ignored "-Wcast-qual" #endif static inline void __mempool_check_cookies(const struct rte_mempool *mp, @@ -380,7 +381,7 @@ static inline void __mempool_check_cooki } } #ifndef __INTEL_COMPILER -#pragma GCC diagnostic error "-Wcast-qual" +#pragma GCC pop_options #endif #else #define __mempool_check_cookies(mp, obj_table_const, n, free) do {} while(0)