qemacs-commit
[Top][All Lists]
Advanced

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

[Qemacs-commit] qemacs buffer.c qe.c


From: Charlie Gordon
Subject: [Qemacs-commit] qemacs buffer.c qe.c
Date: Sat, 25 Jan 2014 09:21:48 +0000

CVSROOT:        /sources/qemacs
Module name:    qemacs
Changes by:     Charlie Gordon <chqrlie>        14/01/25 09:21:48

Modified files:
        .              : buffer.c qe.c 

Log message:
        fix compilation warnings

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/qemacs/buffer.c?cvsroot=qemacs&r1=1.66&r2=1.67
http://cvs.savannah.gnu.org/viewcvs/qemacs/qe.c?cvsroot=qemacs&r1=1.135&r2=1.136

Patches:
Index: buffer.c
===================================================================
RCS file: /sources/qemacs/qemacs/buffer.c,v
retrieving revision 1.66
retrieving revision 1.67
diff -u -b -r1.66 -r1.67
--- buffer.c    24 Jan 2014 00:46:26 -0000      1.66
+++ buffer.c    25 Jan 2014 09:21:48 -0000      1.67
@@ -1130,18 +1130,18 @@
 
     if (b->b_styles) {
         if (b->style_shift == 2) {
-            *(uint32_t*)buf = 0;
-            eb_read(b->b_styles, (offset >> b->char_shift) << 2, buf, 4);
-            b->cur_style = *(uint32_t*)buf;
+            uint32_t style = 0;
+            eb_read(b->b_styles, (offset >> b->char_shift) << 2, &style, 4);
+            b->cur_style = style;
         } else
         if (b->style_shift == 1) {
-            *(uint16_t*)buf = 0;
-            eb_read(b->b_styles, (offset >> b->char_shift) << 1, buf, 2);
-            b->cur_style = *(uint16_t*)buf;
-        } else {
-            *(uint8_t*)buf = 0;
-            eb_read(b->b_styles, (offset >> b->char_shift), buf, 1);
-            b->cur_style = *(uint8_t*)buf;
+            uint16_t style = 0;
+            eb_read(b->b_styles, (offset >> b->char_shift) << 1, &style, 2);
+            b->cur_style = style;
+        } else {
+            uint8_t style = 0;
+            eb_read(b->b_styles, (offset >> b->char_shift), &style, 1);
+            b->cur_style = style;
         }
     }
     if (eb_read(b, offset, buf, 1) <= 0) {

Index: qe.c
===================================================================
RCS file: /sources/qemacs/qemacs/qe.c,v
retrieving revision 1.135
retrieving revision 1.136
diff -u -b -r1.135 -r1.136
--- qe.c        24 Jan 2014 01:30:54 -0000      1.135
+++ qe.c        25 Jan 2014 09:21:48 -0000      1.136
@@ -5980,7 +5980,7 @@
     *found_offset = -1;
     *found_end = -1;
 
-    for (;; dir >= 0 && eb_nextc(b, offset, &offset)) {
+    for (;; (void)(dir >= 0 && eb_nextc(b, offset, &offset))) {
         if (dir < 0) {
             if (offset == 0)
                 return 0;



reply via email to

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