From: Paul Eggert Date: Tue, 26 Apr 2011 07:35:23 +0000 (-0700) Subject: * gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. X-Git-Tag: emacs-pretest-24.0.90~104^2~275^2~210 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=c892615246aca066a2b8df322d6d808ded38af6b;p=emacs.git * gnutls.c (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. --- diff --git a/src/ChangeLog b/src/ChangeLog index aea040263bd..2fa0e5468ea 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -8,6 +8,7 @@ (emacs_gnutls_handle_error): Remove unused local. (Fgnutls_boot): gnutls_certificate_verify_peers2 wants unsigned *. Remove unused local. + (emacs_gnutls_write): Don't use uninitialized rtnval if nbyte <= 0. lisp.h: Fix a problem with aliasing and vector headers. GCC 4.6.0 optimizes based on type-based alias analysis. For diff --git a/src/gnutls.c b/src/gnutls.c index c0e078151a2..1abccbbfbee 100644 --- a/src/gnutls.c +++ b/src/gnutls.c @@ -130,7 +130,7 @@ EMACS_INT emacs_gnutls_write (int fildes, struct Lisp_Process *proc, const char *buf, EMACS_INT nbyte) { - ssize_t rtnval; + ssize_t rtnval = 0; EMACS_INT bytes_written; gnutls_session_t state = proc->gnutls_state;