Subject: bug#9318: 23.3.50; The first call of encode-coding-region() returns wrong result

From: Paul Eggert <[email-masked]>
Date: Mon, 05 Dec 2011 01:11:53 -0800

That patch (bzr 106613) causes Emacs to use an uninitialized variable;
I found this via static checking with GCC.  I installed the following
further patch, which I think is right and anyway does not introduce a bug --
can you please check it?  Thanks.

* coding.c (encode_designation_at_bol): Don't use uninitialized
local variable (Bug#9318).
=== modified file 'src/coding.c'
--- src/coding.c	2011-12-05 07:03:31 +0000
+++ src/coding.c	2011-12-05 09:00:44 +0000
@@ -4356,7 +4356,7 @@
 			   int *charbuf, int *charbuf_end,
 			   unsigned char *dst)
 {
-  unsigned char *orig;
+  unsigned char *orig = dst;
   struct charset *charset;
   /* Table of charsets to be designated to each graphic register.  */
   int r[4];