coreboot/src
Paul Menzel e43d4c6b39 UPSTREAM: nb/intel/i945/gma: Declare count variable outside 'for' loop
Building an image for the Lenovo X60 on Debian 8.5 (jessie) with GCC 4.9.2,
compilation fails with the error below.

```
$ gcc --version
gcc (Debian 4.9.2-10) 4.9.2
[]
$ make # lenovo/x60 with native graphics initialization
[]
    CC         ramstage/northbridge/intel/i945/gma.o
src/northbridge/intel/i945/gma.c: In function 'probe_edid':
src/northbridge/intel/i945/gma.c:570:2: error: 'for' loop initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i < 8; i++) {
  ^
src/northbridge/intel/i945/gma.c:570:2: note: use option -std=c99, -std=gnu99, -std=c11 or -std=gnu11 to compile your code
Makefile:316: recipe for target 'build/ramstage/northbridge/intel/i945/gma.o' failed
make: *** [build/ramstage/northbridge/intel/i945/gma.o] Error 1
```

Fix this by declaring the count variable outside the 'for' loop.

BUG=None
BRANCH=None
TEST=None

Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17623
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>

Change-Id: Icf69337ee46c86bafc4e1320fd99f8f8f5155bfe
Reviewed-on: https://chromium-review.googlesource.com/415626
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-12-01 00:50:37 -08:00
..
acpi UPSTREAM: src/acpi: Capitalize ACPI and SATA 2016-08-04 23:37:57 -07:00
arch UPSTREAM: Build system: Update HAVE_CMOS_DEFAULT 2016-11-30 02:53:56 -08:00
commonlib UPSTREAM: commonlib/include: remove NEED_VB20_INTERNALS 2016-11-21 11:53:31 -08:00
console UPSTREAM: console/vtxprintf.c: cast precision to size_t for string length 2016-11-29 17:38:21 -08:00
cpu UPSTREAM: AGESA binaryPI: Fix cache-as-ram for x86_64 2016-11-30 02:53:14 -08:00
device UPSTREAM: device/dram/ddr3: Fix calculation CRC16 of SPD 2016-11-21 11:54:09 -08:00
drivers UPSTREAM: Build system: Update HAVE_CMOS_DEFAULT 2016-11-30 02:53:56 -08:00
ec UPSTREAM: google/parrot: Fix keyboard interrupts, DSDT 2016-11-30 02:53:19 -08:00
include UPSTREAM: x86 BIST: Fix missing include 2016-11-30 02:53:12 -08:00
lib UPSTREAM: intel post-car: Increase stacktop alignment 2016-11-21 11:53:20 -08:00
mainboard UPSTREAM: google/pyro: disable unused devices 2016-12-01 00:50:33 -08:00
northbridge UPSTREAM: nb/intel/i945/gma: Declare count variable outside 'for' loop 2016-12-01 00:50:37 -08:00
soc UPSTREAM: intel/sch: Switch to MMCONF_SUPPORT_DEFAULT 2016-12-01 00:50:28 -08:00
southbridge UPSTREAM: sb/intel/i3100/lpc.c: Use tab for indents 2016-11-30 02:53:37 -08:00
superio UPSTREAM: sio/nuvoton: Include generic nuvoton driver in bootblock stage 2016-11-30 02:54:10 -08:00
vboot UPSTREAM: commonlib/include: remove NEED_VB20_INTERNALS 2016-11-21 11:53:31 -08:00
vendorcode UPSTREAM: vendorcode/siemens: Add HWID to hwilib 2016-11-30 02:53:07 -08:00
Kconfig UPSTREAM: Remove explicit select MMCONF_SUPPORT 2016-11-29 17:38:33 -08:00