]> git.eshelyaron.com Git - emacs.git/commitdiff
* coding.c: (decode_coding_object, encode_coding_object, detect_coding_system):
authorPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:12:45 +0000 (23:12 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Tue, 8 Mar 2011 07:12:45 +0000 (23:12 -0800)
Mark variables that gcc -Wuninitialized does not deduce are never
used uninitialized.

src/ChangeLog
src/coding.c

index 1b518a6341cc844201d107cad215a4ce350a0538..ae111aef44c9d3d3e4a6e2f1db37660680ac47bb 100644 (file)
@@ -53,6 +53,9 @@
        * coding.c (emacs_mule_char, encode_invocation_designation):
        Now static, since they're not used elsewhere.
        (decode_coding_iso_2022): Add "default: abort ();" as a safety check.
+       (decode_coding_object, encode_coding_object, detect_coding_system):
+       Mark variables that gcc -Wuninitialized does not deduce are never
+       used uninitialized.
 
 2011-03-06  Chong Yidong  <cyd@stupidchicken.com>
 
index c9d324893511dbaea859a5fc26713af42000658d..75fc92eee8dbe1dbd080c2504f53485746f80647 100644 (file)
@@ -7658,12 +7658,12 @@ decode_coding_object (struct coding_system *coding,
                      Lisp_Object dst_object)
 {
   int count = SPECPDL_INDEX ();
-  unsigned char *destination;
-  EMACS_INT dst_bytes;
+  unsigned char *destination IF_LINT (= NULL);
+  EMACS_INT dst_bytes IF_LINT (= 0);
   EMACS_INT chars = to - from;
   EMACS_INT bytes = to_byte - from_byte;
   Lisp_Object attrs;
-  int saved_pt = -1, saved_pt_byte;
+  int saved_pt = -1, saved_pt_byte IF_LINT (= 0);
   int need_marker_adjustment = 0;
   Lisp_Object old_deactivate_mark;
 
@@ -7851,7 +7851,7 @@ encode_coding_object (struct coding_system *coding,
   EMACS_INT chars = to - from;
   EMACS_INT bytes = to_byte - from_byte;
   Lisp_Object attrs;
-  int saved_pt = -1, saved_pt_byte;
+  int saved_pt = -1, saved_pt_byte IF_LINT (= 0);
   int need_marker_adjustment = 0;
   int kill_src_buffer = 0;
   Lisp_Object old_deactivate_mark;
@@ -8184,8 +8184,8 @@ detect_coding_system (const unsigned char *src,
   base_category = XINT (CODING_ATTR_CATEGORY (attrs));
   if (base_category == coding_category_undecided)
     {
-      enum coding_category category;
-      struct coding_system *this;
+      enum coding_category category IF_LINT (= 0);
+      struct coding_system *this IF_LINT (= NULL);
       int c, i;
 
       /* Skip all ASCII bytes except for a few ISO2022 controls.  */