]> git.wh0rd.org - fontconfig.git/blobdiff - src/fccache.c
FcStat: change to FcChar8 for first arg
[fontconfig.git] / src / fccache.c
index d865266230dde92433f0233bc617936bb1f931b7..c38a7050edd837cba58165ab42614ec7224d85df 100644 (file)
@@ -87,7 +87,7 @@ typedef __int64 INT64;
  */
 
 int
-FcStat (const char *file, struct stat *statb)
+FcStat (const FcChar8 *file, struct stat *statb)
 {
     WIN32_FILE_ATTRIBUTE_DATA wfad;
     char full_path_name[MAX_PATH];
@@ -136,7 +136,7 @@ FcStat (const char *file, struct stat *statb)
 #else
 
 int
-FcStat (const char *file, struct stat *statb)
+FcStat (const FcChar8 *file, struct stat *statb)
 {
   return stat ((char *) file, statb);
 }
@@ -727,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;
@@ -738,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
      */
@@ -747,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;
@@ -1167,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 */
 }