From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-qt1-f175.google.com (mail-qt1-f175.google.com [209.85.160.175]) by dpdk.org (Postfix) with ESMTP id 9BDC24F98 for ; Wed, 17 Oct 2018 02:23:04 +0200 (CEST) Received: by mail-qt1-f175.google.com with SMTP id l9-v6so28056564qtf.5 for ; Tue, 16 Oct 2018 17:23:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=7sybXNntog3FIQSrKqoxk+6lyJo40XkZdIzjXv/Ak6A=; b=kSzgioV4vXPBnnJCCMVios9B2IeLZjU25UXnldqFlTL/vonoednaEAixZfFeC2zTa8 ucYro/CUJH8qmoA0W7xkchu/vQXSNE5ThTD/MiPMUMdE83kjcT625mnwBZOw4RNm+srs utak/O6QS9p7xBTqBf7icwdBsjhOd/mk0n6ug61uJvZ+ysDJhU+hJFy444oXKQWIHmks AfNMgQNVSTf7iDu9jMBujZBVeR60mF3VrAx5LA1HZNmvGoqtGWE5jr0uVtJKSOj9RzD9 zEyg6m1xwDYQUoRMxp0wRv9k9cX3XL2PsBv32YnEuCxvdhpV6EoSmvtQNSIVquyU4hP+ zNkw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=7sybXNntog3FIQSrKqoxk+6lyJo40XkZdIzjXv/Ak6A=; b=CQuiWK/6+nuOSmscGLAzhLltJ55IM0wdqtVrt342btUACxz97pHtWx9voSqQHphmPH 0gIOXkerM0uNyi9IQNJ42l/8EC+2zeXPQR+o/g4jwiQ9MZzIS9PlvkBE5SQr13+JB1zR BVXYaLnKiwa/Qbw7lbNez6O8FO4C2lhXxr3ero7Ia3ZE5h2t7qIEjKwB7oz4NC2Jt9zM 013z3apFofhH/eNNOswjEA7YF21Kns+B/soox93Q7uWjOmLCjKZ8vR6SAT1drAdMi7tN WDY4W+M9D83PlbHgJwCztKmH68Oc1mTTs1YjvQ3tPpBP6Y18SHoTn4+04ZqwnFttm7x7 CWJw== X-Gm-Message-State: ABuFfogAgEVLIpoJfLeHTVm1gx+Fa7RzsUeFJA1qxyiHdt8svohpnUU2 zDK/mkZ0c7tBP29xXDj7TQEvI5kMKVE= X-Google-Smtp-Source: ACcGV62CL3lpYaYdXTc828DCodLB4UBWWWjwcG4w/FwF9ove0LsyS8bSFRGEFRx0Do9EZccmzJcBtg== X-Received: by 2002:ac8:1967:: with SMTP id g36-v6mr21730353qtk.193.1539735783497; Tue, 16 Oct 2018 17:23:03 -0700 (PDT) Received: from snappy.local.lan ([187.74.142.5]) by smtp.gmail.com with ESMTPSA id f90-v6sm13052061qkf.49.2018.10.16.17.23.01 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 16 Oct 2018 17:23:02 -0700 (PDT) Sender: Dan Gora From: Dan Gora To: dev@dpdk.org Cc: Dan Gora , anatoly.burakov@intel.com Date: Tue, 16 Oct 2018 21:22:44 -0300 Message-Id: <20181017002244.6117-1-dg@adax.com> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Subject: [dpdk-dev] [PATCH] test: fix compilation error in external memory test 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: , X-List-Received-Date: Wed, 17 Oct 2018 00:23:04 -0000 Fix a compilation error in test_external_mem.c: CC test_external_mem.o test_external_mem.c: In function ‘test_external_mem’: test_external_mem.c:375:2: error: ‘for’ loop initial declarations are only allowed in C99 mode for (int i = 0; i < n_pages; i++) { ^ test_external_mem.c:375:2: note: use option -std=c99 or -std=gnu99 to compile your code Fixes: b270daa43b3d ("test: support external memory") Cc: anatoly.burakov@intel.com Signed-off-by: Dan Gora --- test/test/test_external_mem.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/test/test/test_external_mem.c b/test/test/test_external_mem.c index d0837aa35..998cafa68 100644 --- a/test/test/test_external_mem.c +++ b/test/test/test_external_mem.c @@ -362,6 +362,7 @@ test_external_mem(void) rte_iova_t iova[len / pgsz]; void *addr; int ret, n_pages; + int i; /* create external memory area */ n_pages = RTE_DIM(iova); @@ -372,7 +373,7 @@ test_external_mem(void) __func__, __LINE__); return -1; } - for (int i = 0; i < n_pages; i++) { + for (i = 0; i < n_pages; i++) { /* arbitrary IOVA */ rte_iova_t tmp = 0x100000000 + i * pgsz; iova[i] = tmp; -- 2.19.0