Fix uninitialized variable warning in trval.c
authorGreg Hudson <ghudson@mit.edu>
Tue, 7 Feb 2012 15:45:59 +0000 (15:45 +0000)
committerGreg Hudson <ghudson@mit.edu>
Tue, 7 Feb 2012 15:45:59 +0000 (15:45 +0000)
gcc -O3 is agressive enough to detect that do_cons() doesn't always
set the value of rlen2, so trval2() gets a maybe-uninitialized
warning.  Squash it by initializing rlen2.

ticket: 7088
target_version: 1.10.1
tags: pullup

git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@25679 dc483132-0cff-0310-8789-dd5450dbe970

src/tests/asn.1/trval.c

index bdfea4e2f7df32eb81f824ef8eab92a51c2d3116..c5afc8c2f39986b4349cdaf586e2bde4d252fb67 100644 (file)
@@ -176,7 +176,7 @@ int trval2(fp, enc, len, lev, rlen)
     int lev;
     int *rlen;
 {
-    int l, eid, elen, xlen, r, rlen2;
+    int l, eid, elen, xlen, r, rlen2 = 0;
     int rlen_ext = 0;
 
     r = OK;