2010/10/7 Uwe Hermann <span dir="ltr"><<a href="mailto:uwe@hermann-uwe.de">uwe@hermann-uwe.de</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div class="im">On Wed, Oct 06, 2010 at 02:00:35PM +0200, Carl-Daniel Hailfinger wrote:<br>
> flashrom -L output did not contain a list of programmers nor were all<br>
> programmers listed.<br>
> Fix it.<br>
> (Well, mostly. Some programmers have no devices listed. And formatting<br>
> on 80 column screens is totally broken for the flash chip list.)<br>
> Wiki output is unchanged, and will need separate fixups.<br>
><br>
> Signed-off-by: Carl-Daniel Hailfinger <<a href="mailto:c-d.hailfinger.devel.2006@gmx.net">c-d.hailfinger.devel.2006@gmx.net</a>><br>
<br>
</div>Acked-by: Uwe Hermann <<a href="mailto:uwe@hermann-uwe.de">uwe@hermann-uwe.de</a>><br>
<br>
But:<br>
<br>
flashrom.c:1351: error: ‘for’ loop initial declarations are only allowed in C99 mode<br>
flashrom.c:1351: note: use option -std=c99 or -std=gnu99 to compile your code<br>
make: *** [flashrom.o] Error 1<br>
<br>
<br>
I think this is the culprit:<br>
<div class="im"><br>
  for (int i = 0; i < startcol; i++)<br>
          printf(" ");<br>
<br>
</div>Moving the "int i;" to the top of the function should fix it.<br></blockquote><div><br>I think this is a better fix than this:<br><br>Index: Makefile<br>===================================================================<br>
--- Makefile    (revision 1196)<br>+++ Makefile    (working copy)<br>@@ -26,7 +26,7 @@<br> DIFF    = diff<br> PREFIX  ?= /usr/local<br> MANDIR  ?= $(PREFIX)/share/man<br>-CFLAGS  ?= -Os -Wall -Wshadow<br>+CFLAGS  ?= -Os -Wall -Wshadow -std=c99<br>
 EXPORTDIR ?= .<br><br> WARNERROR ?= yes<br><br><br>The above, with the patch in question applied, results in this error:<br><br>cc1: warnings being treated as errors<br>flashrom.c: In function ‘doit’:<br>flashrom.c:1596: error: implicit declaration of function ‘fileno’<br>
make: *** [flashrom.o] Error 1<br><br> <br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<br>
However, I also think we should change the printing after 0.9.3 to fit<br>
into 80 chars/line again. Names like "W29C010(M)/W29C011A/W29EE011/W29EE012"<br>
make it very hard though, we should shorten them.<br>
<br>
<br>
Uwe.<br>
<font color="#888888">--<br>
<a href="http://hermann-uwe.de" target="_blank">http://hermann-uwe.de</a>     | <a href="http://sigrok.org" target="_blank">http://sigrok.org</a><br>
<a href="http://randomprojects.org" target="_blank">http://randomprojects.org</a> | <a href="http://unmaintained-free-software.org" target="_blank">http://unmaintained-free-software.org</a><br>
</font><div><div></div><div class="h5"><br>
_______________________________________________<br>
flashrom mailing list<br>
<a href="mailto:flashrom@flashrom.org">flashrom@flashrom.org</a><br>
<a href="http://www.flashrom.org/mailman/listinfo/flashrom" target="_blank">http://www.flashrom.org/mailman/listinfo/flashrom</a></div></div></blockquote></div><br>