From 1cadda12af46a3f0a3560190e5ead55631ca14f9 Mon Sep 17 00:00:00 2001 From: Ken Raeburn Date: Tue, 10 Apr 2001 03:32:34 +0000 Subject: [PATCH] * pcbc_encrypt.c (des_pcbc_encrypt): Initialize plainl and plainr to keep compiler happy. git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@13151 dc483132-0cff-0310-8789-dd5450dbe970 --- src/lib/des425/ChangeLog | 3 +++ src/lib/des425/pcbc_encrypt.c | 12 +++++++++--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/lib/des425/ChangeLog b/src/lib/des425/ChangeLog index 3efa1a30e..3e19c6137 100644 --- a/src/lib/des425/ChangeLog +++ b/src/lib/des425/ChangeLog @@ -1,5 +1,8 @@ 2001-04-09 Ken Raeburn + * pcbc_encrypt.c (des_pcbc_encrypt): Initialize plainl and plainr + to keep compiler happy. + * des.h: Deleted to avoid confusion with the other des.h in the tree. All files changed to include des_int.h and (the other) des.h instead. diff --git a/src/lib/des425/pcbc_encrypt.c b/src/lib/des425/pcbc_encrypt.c index dd9ad1995..e47817061 100644 --- a/src/lib/des425/pcbc_encrypt.c +++ b/src/lib/des425/pcbc_encrypt.c @@ -15,7 +15,8 @@ * des_pcbc_encrypt.c - encrypt a string of characters in error propagation mode */ -#include "des425.h" +#include "des_int.h" +#include "des.h" #include /* @@ -44,8 +45,13 @@ des_pcbc_encrypt(in, out, length, schedule, ivec, encrypt) * Deal with encryption and decryption separately. */ if (encrypt) { - register unsigned DES_INT32 plainl; - register unsigned DES_INT32 plainr; + /* Initialization isn't really needed here, but gcc + complains because it doesn't understand that the + only case where these can be used uninitialized is + to compute values that'll in turn be ignored + because we won't go around the loop again. */ + register unsigned DES_INT32 plainl = 42; + register unsigned DES_INT32 plainr = 17; /* * Initialize left and right with the contents of the initial -- 2.26.2