On 31/03/2016 03:44, Kevin O'Connor wrote: > > Compile checking out/src/hw/mpt-scsi.o > > src/hw/mpt-scsi.c: In function 'init_mpt_scsi': > > src/hw/mpt-scsi.c:281:5: error: 'for' loop initial declarations are only > > allowed in C99 mode > > for (int i = 0; i < 7; i++) > > ^ > > src/hw/mpt-scsi.c:281:5: note: use option -std=c99 or -std=gnu99 to compile > > your code > > make: *** [out/src/hw/mpt-scsi.o] Error 1 > > error: Bad exit status from /var/tmp/rpm-tmp.YLsXMX (%build) > > It's interesting that newer compilers accept the 'int i' declaration > inside of for loops - I didn't realize that was allowed in C99. In > any case, I pulled the declaration outside the loop to suppress the > error, and I committed the change.
My fault, I did that on purpose---because SeaBIOS uses mixed declarations and statements I assumed that it was using -std=gnu99 already. Paolo _______________________________________________ SeaBIOS mailing list [email protected] https://www.coreboot.org/mailman/listinfo/seabios
