Stefan Tauner has posted comments on this change. ( https://review.coreboot.org/21702 )
Change subject: nicintel_eeprom: Move variable declarations out of loops
......................................................................
Patch Set 1:
> > We do not (want to) support non-C99 compilers and I seriously
> doubt
> > that this is really the issue and thus the best fix. Can you
> please
> > show us the compiler's diagnostics and build_details.txt?
>
> Well, we kept the code compatible until now and as long as we don't
> specify the standard, should keep it that way.
No, we didn't at all. Why do you think so? Not *forcing* a version in the makefile does not mean we support *every* compiler out there. We use lots of C99 features all around the code base... including variable declarations in for heads. The report (and patch) are lacking details...
--
To view, visit https://review.coreboot.org/21702
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 26 Sep 2017 18:01:12 +0000
Gerrit-HasComments: No
Nico Huber has posted comments on this change. ( https://review.coreboot.org/21702 )
Change subject: nicintel_eeprom: Move variable declarations out of loops
......................................................................
Patch Set 1: Code-Review+2
> We do not (want to) support non-C99 compilers and I seriously doubt
> that this is really the issue and thus the best fix. Can you please
> show us the compiler's diagnostics and build_details.txt?
Well, we kept the code compatible until now and as long as we don't
specify the standard, should keep it that way.
--
To view, visit https://review.coreboot.org/21702
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 26 Sep 2017 17:48:44 +0000
Gerrit-HasComments: No
Stefan Tauner has posted comments on this change. ( https://review.coreboot.org/21702 )
Change subject: nicintel_eeprom: Move variable declarations out of loops
......................................................................
Patch Set 1: Code-Review-1
We do not (want to) support non-C99 compilers and I seriously doubt that this is really the issue and thus the best fix. Can you please show us the compiler's diagnostics and build_details.txt?
--
To view, visit https://review.coreboot.org/21702
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: comment
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Stefan Tauner <stefan.tauner(a)gmx.at>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Tue, 26 Sep 2017 17:36:45 +0000
Gerrit-HasComments: No
David Hendricks has uploaded this change for review. ( https://review.coreboot.org/21702
Change subject: nicintel_eeprom: Move variable declarations out of loops
......................................................................
nicintel_eeprom: Move variable declarations out of loops
A couple of C99-style variable declarations within loops are causing
compilation failures on some systems (gcc 4.9.2-10 on Raspbian). This
moves them to make gcc happy.
Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Signed-off-by: David Hendricks <david.hendricks(a)gmail.com>
---
M nicintel_eeprom.c
1 file changed, 4 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/02/21702/1
diff --git a/nicintel_eeprom.c b/nicintel_eeprom.c
index e2fb584..e4a91ef 100644
--- a/nicintel_eeprom.c
+++ b/nicintel_eeprom.c
@@ -211,7 +211,8 @@
pci_mmio_writel(eewr, nicintel_eebar + EEWR);
programmer_delay(5);
- for (int i = 0; i < MAX_ATTEMPTS; i++)
+ int i;
+ for (i = 0; i < MAX_ATTEMPTS; i++)
if (pci_mmio_readl(nicintel_eebar + EEWR) & BIT(EEWR_DONE))
return 0;
return -1;
@@ -419,7 +420,8 @@
flup |= BIT(EE_FLUPD);
pci_mmio_writel(flup, nicintel_eebar + EEC);
- for (int i = 0; i < MAX_ATTEMPTS; i++)
+ int i;
+ for (i = 0; i < MAX_ATTEMPTS; i++)
if (pci_mmio_readl(nicintel_eebar + EEC) & BIT(EE_FLUDONE))
return 0;
--
To view, visit https://review.coreboot.org/21702
To unsubscribe, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: staging
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib7ad5a69244e462f84eae93df9e841716e089b31
Gerrit-Change-Number: 21702
Gerrit-PatchSet: 1
Gerrit-Owner: David Hendricks <david.hendricks(a)gmail.com>