From c63204d86d1ee8531daf3d1cfe02df33c2756bac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Sun, 26 Dec 2021 18:18:39 +0100 Subject: [PATCH] lspci: Do not declare variable inside for-loop declaration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Such construction does not compile with i586-mingw32msvc-gcc or MSVC compiler. On i586-mingw32msvc-gcc it throws following fatal error: ls-ecaps.c:657: error: ‘for’ loop initial declaration used outside C99 mode --- ls-ecaps.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ls-ecaps.c b/ls-ecaps.c index 2c63aeb..b6dd6ea 100644 --- a/ls-ecaps.c +++ b/ls-ecaps.c @@ -660,8 +660,9 @@ cap_rcec(struct device *d, int where) int prevmatched=0; int adjcount=0; int prevdev=0; + int dev; printf("RCiEP at Device(s):"); - for (int dev=0; dev < 32; dev++) + for (dev=0; dev < 32; dev++) { if (BITS(bmap, dev, 1)) {