I committed the patch.
Yet I am surprised you can compile qemacs with a C89 compiler.
Structure initializations use the new C89 syntax.
I suspect the version of gcc you use supports some but not all of the c99 
extensions.
Why do you stick to an old and probably obsolete version of gcc ?

Chqrlie.

On 6 janv. 2014, at 12:08, François Revol <re...@free.fr> wrote:

> Fixes gcc 4.8.2 complaint (and C89 is required for Haiku as well):
> buffer.c:903:5: error: ‘for’ loop initial declarations are only allowed
> in C99 mode
>     for (int n = 0; n < b->nb_pages; n++) {
>     ^
> buffer.c:903:5: note: use option -std=c99 or -std=gnu99 to compile your code
> 
> 
> François.
> 
> Index: buffer.c
> ===================================================================
> RCS file: /sources/qemacs/qemacs/buffer.c,v
> retrieving revision 1.51
> diff -u -r1.51 buffer.c
> --- buffer.c  6 Jan 2014 09:40:20 -0000       1.51
> +++ buffer.c  6 Jan 2014 11:06:01 -0000
> @@ -890,6 +890,8 @@
> 
> void eb_set_charset(EditBuffer *b, QECharset *charset)
> {
> +    int n;
> +
>     if (b->charset) {
>         charset_decode_close(&b->charset_state);
>     }
> @@ -900,7 +902,7 @@
>     charset_decode_init(&b->charset_state, charset);
> 
>     /* Reset page cache flags */
> -    for (int n = 0; n < b->nb_pages; n++) {
> +    for (n = 0; n < b->nb_pages; n++) {
>         Page *p = &b->page_table[n];
>         p->flags &= ~(PG_VALID_POS | PG_VALID_CHAR | PG_VALID_COLORS);
>     }
> 
> _______________________________________________
> Qemacs-devel mailing list
> Qemacs-devel@nongnu.org
> https://lists.nongnu.org/mailman/listinfo/qemacs-devel


_______________________________________________
Qemacs-devel mailing list
Qemacs-devel@nongnu.org
https://lists.nongnu.org/mailman/listinfo/qemacs-devel

Reply via email to