The variable was unused and clang warned that it was not emitted to the .o file.


# HG changeset patch
# User Matthias Andree <[email protected]>
# Date 1357072792 -3600
# Branch HEAD
# Node ID ea52317444efa704816667dc5872785acd7a2820
# Parent  32ec63debe52d6a6078d84f5141df9fb80e6af75
Drop unneeded variable HEADER_CACHE that causes clang warnings.

The variable was unused and clang warned that it was not emitted to the .o file.

diff --git a/hcache.c b/hcache.c
--- a/hcache.c
+++ b/hcache.c
@@ -50,28 +50,28 @@
 unsigned int hcachever = 0x0;
 
 #if HAVE_QDBM
-static struct header_cache
+struct header_cache
 {
   VILLA *db;
   char *folder;
   unsigned int crc;
-} HEADER_CACHE;
+};
 #elif HAVE_TC
-static struct header_cache
+struct header_cache
 {
   TCBDB *db;
   char *folder;
   unsigned int crc;
-} HEADER_CACHE;
+};
 #elif HAVE_GDBM
-static struct header_cache
+struct header_cache
 {
   GDBM_FILE db;
   char *folder;
   unsigned int crc;
-} HEADER_CACHE;
+};
 #elif HAVE_DB4
-static struct header_cache
+struct header_cache
 {
   DB_ENV *env;
   DB *db;
@@ -79,7 +79,7 @@
   unsigned int crc;
   int fd;
   char lockfile[_POSIX_PATH_MAX];
-} HEADER_CACHE;
+};
 
 static void mutt_hcache_dbt_init(DBT * dbt, void *data, size_t len);
 static void mutt_hcache_dbt_empty_init(DBT * dbt);
@@ -1107,7 +1107,7 @@
 header_cache_t *
 mutt_hcache_open(const char *path, const char *folder, hcache_namer_t namer)
 {
-  struct header_cache *h = safe_calloc(1, sizeof (HEADER_CACHE));
+  struct header_cache *h = safe_calloc(1, sizeof (struct header_cache));
   int (*hcache_open) (struct header_cache* h, const char* path);
   struct stat sb;
 

Reply via email to