[PATCH] C89
François Revol <[email protected]> Sat, 08 Mar 2014 22:50:17 +0100
| Newsgroups | gmane.editors.qemacs.devel |
|---|---|
| Message-ID | <[email protected]> |
This fixes build with gcc 4.8.2 on debian unstable (which complains about not using -std=c99), and probably also Haiku which requires C89. François. _______________________________________________ Qemacs-devel mailing list [email protected] https://lists.nongnu.org/mailman/listinfo/qemacs-devel
qemacs-archive-c89-2014308.diff
(text/x-patch, 871 B)
Index: archive.c
===================================================================
RCS file: /sources/qemacs/qemacs/archive.c,v
retrieving revision 1.1
diff -u -r1.1 archive.c
--- archive.c 3 Mar 2014 23:56:49 -0000 1.1
+++ archive.c 8 Mar 2014 21:48:43 -0000
@@ -256,6 +256,8 @@
static int compress_init(void)
{
+ int i;
+
/* compress mode is almost like the text mode, so we copy and patch it */
memcpy(&compress_mode, &text_mode, sizeof(ModeDef));
compress_mode.name = "compress";
@@ -263,7 +265,7 @@
compress_mode.mode_init = compress_mode_init;
compress_mode.data_type = &compress_data_type;
- for (int i = 1; i < countof(compress_type_array); i++) {
+ for (i = 1; i < countof(compress_type_array); i++) {
compress_type_array[i - 1].next = compress_type_array + i;
}
compress_types = compress_type_array;