qemacs-commit
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemacs-commit] qemacs script.c clang.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs script.c clang.c
Date: Sun, 13 Apr 2014 22:45:52 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/04/13 22:45:52

Modified files:
        .              : script.c clang.c 

Log message:
        fix compile warnings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/script.c?cvsroot=qemacs&r1=1.10&r2=1.11
http://cvs.savannah.gnu.org/viewcvs/qemacs/clang.c?cvsroot=qemacs&r1=1.55&r2=1.56

Patches:
Index: script.c
===================================================================
RCS file: /sources/qemacs/qemacs/script.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -b -r1.10 -r1.11
--- script.c    10 Apr 2014 06:44:55 -0000      1.10
+++ script.c    13 Apr 2014 22:45:51 -0000      1.11
@@ -71,13 +71,14 @@
             /* parse string const */
             for (i++; i < n;) {
                 c = str[i++];
-                if (c == '\\' && str[i] == '"' && str[start] == '"')
+                if (c == '\\' && i < n && str[start] == '"')
                     i++;
+               else
                 if (c == str[start])
                     break;
             }
             SET_COLOR(str, start, i, style);
-            if (c == str[start])
+            if (i < n)
                 style = SCRIPT_STYLE_TEXT;
             continue;
         case ' ':

Index: clang.c
===================================================================
RCS file: /sources/qemacs/qemacs/clang.c,v
retrieving revision 1.55
retrieving revision 1.56
diff -u -b -r1.55 -r1.56
--- clang.c     10 Apr 2014 07:14:14 -0000      1.55
+++ clang.c     13 Apr 2014 22:45:51 -0000      1.56
@@ -724,7 +724,7 @@
 static void do_c_forward_conditional(EditState *s, int dir)
 {
     unsigned int buf[COLORED_MAX_LINE_SIZE], *p;
-    int line_num, col_num, len, sharp, level;
+    int line_num, col_num, sharp, level;
     int offset, offset0, offset1;
 
     offset = offset0 = eb_goto_bol(s->b, s->offset);
@@ -732,7 +732,7 @@
     level = 0;
     for (;;) {
         offset1 = offset;
-        len = s->get_colorized_line(s, buf, countof(buf), &offset1, line_num);
+        s->get_colorized_line(s, buf, countof(buf), &offset1, line_num);
         sharp = 0;
         for (p = buf; *p; p++) {
             int c = (*p & CHAR_MASK);
@@ -783,7 +783,7 @@
 static void do_c_list_conditionals(EditState *s)
 {
     unsigned int buf[COLORED_MAX_LINE_SIZE], *p;
-    int line_num, col_num, len, sharp, level;
+    int line_num, col_num, sharp, level;
     int offset, offset1;
     EditBuffer *b;
 
@@ -798,7 +798,7 @@
         line_num--;
         offset = eb_prev_line(s->b, offset);
         offset1 = offset;
-        len = s->get_colorized_line(s, buf, countof(buf), &offset1, line_num);
+        s->get_colorized_line(s, buf, countof(buf), &offset1, line_num);
         sharp = 0;
         for (p = buf; *p; p++) {
             int c = (*p & CHAR_MASK);



reply via email to

[Prev in Thread] Current Thread [Next in Thread]