From: Greg Hudson Date: Fri, 1 Feb 2013 16:52:48 +0000 (-0500) Subject: Fix kdb5_util dump.c uninitialized warnings X-Git-Tag: krb5-1.12-alpha1~307 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1b7f7eef8a95bda0135159b2c06a168b56d9f42b;p=thirdparty%2Fkrb5.git Fix kdb5_util dump.c uninitialized warnings Some versions of clang report an uninitialized variable warning (which we treat as an error) in process_k5beta_record. Due to the if-ladder style of the function, uninitialized tmpint values can be copied around in certain error cases, although the garbage values would be ultimately ignored. As a minimal fix, initialize the tmpint variables. ticket: 7560 (new) target_version: 1.11.1 tags: pullup --- diff --git a/src/kadmin/dbutil/dump.c b/src/kadmin/dbutil/dump.c index 869724af68..66a72be9b5 100644 --- a/src/kadmin/dbutil/dump.c +++ b/src/kadmin/dbutil/dump.c @@ -1707,7 +1707,7 @@ process_k5beta_record(fname, kcontext, filep, flags, linenop) int alt_key_len, salt_len, alt_salt_len; char *name; char *mod_name; - int tmpint1, tmpint2, tmpint3; + int tmpint1 = 0, tmpint2 = 0, tmpint3 = 0; int error; const char *try2read; int i;