]> granicus.if.org Git - neomutt/commitdiff
Silence some GCC warnings about uninitialized variables.
authorBrendan Cully <brendan@kublai.com>
Wed, 7 Sep 2005 04:51:11 +0000 (04:51 +0000)
committerBrendan Cully <brendan@kublai.com>
Wed, 7 Sep 2005 04:51:11 +0000 (04:51 +0000)
mx.c
pgp.c

diff --git a/mx.c b/mx.c
index c75ccc6bd6fff1f3ef39b59faa493f6f2ee41340..a18d9b5e9df402526c4511df4cd821f22beb460c 100644 (file)
--- a/mx.c
+++ b/mx.c
@@ -160,13 +160,13 @@ int mx_lock_file (const char *path, int fd, int excl, int dot, int timeout)
 #ifdef USE_FCNTL
   struct flock lck;
   
-
   memset (&lck, 0, sizeof (struct flock));
   lck.l_type = excl ? F_WRLCK : F_RDLCK;
   lck.l_whence = SEEK_SET;
 
   count = 0;
   attempt = 0;
+  prev_sb.st_size = 0; /* silence a GCC warning */
   while (fcntl (fd, F_SETLK, &lck) == -1)
   {
     struct stat sb;
diff --git a/pgp.c b/pgp.c
index fae3ecd3855460f04abce93ea6c938f65c889783..f78d8fd8efbac9d613231b39e1bb08f277004dfc 100644 (file)
--- a/pgp.c
+++ b/pgp.c
@@ -237,7 +237,7 @@ int pgp_application_pgp_handler (BODY *m, STATE *s)
 {
   int needpass = -1, pgp_keyblock = 0;
   int clearsign = 0, rv, rc;
-  int c;
+  int c = 1; /* silence GCC warning */
   long start_pos = 0;
   long bytes, last_pos, offset;
   char buf[HUGE_STRING];