]> git.ipfire.org Git - thirdparty/krb5.git/commitdiff
Work around uninitialized warning in cc_kcm.c
authorTom Yu <tlyu@mit.edu>
Wed, 6 Jan 2016 20:24:16 +0000 (15:24 -0500)
committerTom Yu <tlyu@mit.edu>
Fri, 8 Jan 2016 22:09:29 +0000 (17:09 -0500)
Some versions of clang erroneously detect use of an uninitialized
variable reply_len in kcmio_call() when building on non-Mac platforms.
Initialize it to work around this warning.

(cherry picked from commit 40b007c0d8e2a12c6f4205ac111dee731c9d970c)

ticket: 8335
version_fixed: 1.13.4
tags: -pullup
status: resolved

src/lib/krb5/ccache/cc_kcm.c

index b763ea4a6d3c911e69e1975229d01333dc4dbeeb..6337b57015270129ac1e90ac631279fcc75f7179 100644 (file)
@@ -377,7 +377,7 @@ static krb5_error_code
 kcmio_call(krb5_context context, struct kcmio *io, struct kcmreq *req)
 {
     krb5_error_code ret;
-    size_t reply_len;
+    size_t reply_len = 0;
 
     if (k5_buf_status(&req->reqbuf) != 0)
         return ENOMEM;