From patchwork Fri Feb 20 09:35:51 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stefan Puiu X-Patchwork-Id: 3537 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 A0029B558; Fri, 20 Feb 2015 10:25:19 +0100 (CET) Received: from mail-wi0-f181.google.com (mail-wi0-f181.google.com [209.85.212.181]) by dpdk.org (Postfix) with ESMTP id B2692B555 for ; Fri, 20 Feb 2015 10:25:17 +0100 (CET) Received: by mail-wi0-f181.google.com with SMTP id r20so1529715wiv.2 for ; Fri, 20 Feb 2015 01:25:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id; bh=ntzpmNwDdVBE5g4j8FKjxW79ju2a2n2w0svNpNRa+Tw=; b=LCP2yrjur4vFN0kDl4Z/Sp87wcWpPmhvYxGWaN20zX/VbYkzInssbqQN7hmHHUvHZ7 DYhqy0fs/QGA0m/KB8uOkzMCARjyKVtQc7x54nJE1ibN/th/8YN77zQ3n5pES65VZF4U ulXOPAkWrTKLjM5IeisiTL7DsKLJ53VSdTFVTO8a/Qq68wQ4f7gk+ZaFfCEdA1ble1Xh 7bdB0AzWaXrE2jIQJbS7tAe8dM9UCQMvp52S9hUk76WVV0sNuNK72wsUqAbJsDZbzljB gyvRYWWwo7raUf3/D13lMieTA9b94eL/gMJp42zSJuJjB0GHrHeFsl94ECZ5TX0P6zuq qqEA== X-Received: by 10.194.87.100 with SMTP id w4mr16398670wjz.65.1424424317543; Fri, 20 Feb 2015 01:25:17 -0800 (PST) Received: from spuiu-vm.anuesystems.local ([109.100.41.154]) by mx.google.com with ESMTPSA id bd8sm41178570wjc.21.2015.02.20.01.25.16 (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 20 Feb 2015 01:25:16 -0800 (PST) From: Stefan Puiu To: dev@dpdk.org Date: Fri, 20 Feb 2015 11:35:51 +0200 Message-Id: <1424424952-16885-1-git-send-email-stefan.puiu@gmail.com> X-Mailer: git-send-email 1.7.9.5 Subject: [dpdk-dev] [PATCH] rte_pci.h: Fix C++11 compilation 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" In C++11 concatenated string literals need to have a space in between. Found with clang++-3.4, IIRC g++-4.8 also complains about this. Sample error message: dpdk/include/rte_pci.h:96:26: error: invalid suffix on literal; C++11 requires a space between literal and identifier [-Wreserved-user-defined-literal] Signed-off-by: Stefan Puiu --- lib/librte_eal/common/include/rte_pci.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/librte_eal/common/include/rte_pci.h b/lib/librte_eal/common/include/rte_pci.h index 66ed793..12ae5a7 100644 --- a/lib/librte_eal/common/include/rte_pci.h +++ b/lib/librte_eal/common/include/rte_pci.h @@ -93,10 +93,10 @@ extern struct pci_device_list pci_device_list; /**< Global list of PCI devices. #define SYSFS_PCI_DEVICES "/sys/bus/pci/devices" /** Formatting string for PCI device identifier: Ex: 0000:00:01.0 */ -#define PCI_PRI_FMT "%.4"PRIx16":%.2"PRIx8":%.2"PRIx8".%"PRIx8 +#define PCI_PRI_FMT "%.4" PRIx16 ":%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 /** Short formatting string, without domain, for PCI device: Ex: 00:01.0 */ -#define PCI_SHORT_PRI_FMT "%.2"PRIx8":%.2"PRIx8".%"PRIx8 +#define PCI_SHORT_PRI_FMT "%.2" PRIx8 ":%.2" PRIx8 ".%" PRIx8 /** Nb. of values in PCI device identifier format string. */ #define PCI_FMT_NVAL 4