]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccache.c
delete unused variables
[fontconfig.git] / src / fccache.c
index 1bbd79975602b1b9ae13c530d3646da592771e7c..2fd74549ac8f236f7b5dd457a4c709ad7e6c4a3a 100644 (file)
@@ -132,6 +132,15 @@ FcStat (const char *file, struct stat *statb)
 
     return 0;
 }
+
+#else
+
+int
+FcStat (const char *file, struct stat *statb)
+{
+  return stat ((char *) file, statb);
+}
+
 #endif
 
 static const char bin2hex[] = { '0', '1', '2', '3',
@@ -234,7 +243,7 @@ FcDirCacheProcess (FcConfig *config, const FcChar8 *dir,
     struct stat file_stat, dir_stat;
     FcBool     ret = FcFalse;
 
-    if (FcStat ((char *) dir, &dir_stat) < 0)
+    if (FcStat (dir, &dir_stat) < 0)
         return FcFalse;
 
     FcDirCacheBasename (dir, cache_base);
@@ -516,7 +525,7 @@ FcCacheTimeValid (FcCache *cache, struct stat *dir_stat)
 
     if (!dir_stat)
     {
-       if (FcStat ((const char *) FcCacheDir (cache), &dir_static) < 0)
+       if (FcStat (FcCacheDir (cache), &dir_static) < 0)
            return FcFalse;
        dir_stat = &dir_static;
     }
@@ -718,8 +727,6 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
     FcSerialize        *serialize = FcSerializeCreate ();
     FcCache *cache;
     int i;
-    intptr_t   cache_offset;
-    intptr_t   dirs_offset;
     FcChar8    *dir_serialize;
     intptr_t   *dirs_serialize;
     FcFontSet  *set_serialize;
@@ -729,7 +736,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
     /*
      * Space for cache structure
      */
-    cache_offset = FcSerializeReserve (serialize, sizeof (FcCache));
+    FcSerializeReserve (serialize, sizeof (FcCache));
     /*
      * Directory name
      */
@@ -738,7 +745,7 @@ FcDirCacheBuild (FcFontSet *set, const FcChar8 *dir, struct stat *dir_stat, FcSt
     /*
      * Subdirs
      */
-    dirs_offset = FcSerializeAlloc (serialize, dirs, dirs->num * sizeof (FcChar8 *));
+    FcSerializeAlloc (serialize, dirs, dirs->num * sizeof (FcChar8 *));
     for (i = 0; i < dirs->num; i++)
        if (!FcStrSerializeAlloc (serialize, dirs->strs[i]))
            goto bail1;
@@ -1158,7 +1165,7 @@ static void MD5Final(unsigned char digest[16], struct MD5Context *ctx)
     MD5Transform(ctx->buf, (FcChar32 *) ctx->in);
     byteReverse((unsigned char *) ctx->buf, 4);
     memcpy(digest, ctx->buf, 16);
-    memset(ctx, 0, sizeof(ctx));        /* In case it's sensitive */
+    memset(ctx, 0, sizeof(*ctx));        /* In case it's sensitive */
 }