]> git.wh0rd.org - fontconfig.git/commitdiff
delete unused variables
authorMike Frysinger <vapier@gentoo.org>
Mon, 7 Nov 2011 20:18:26 +0000 (15:18 -0500)
committerMike Frysinger <vapier@gentoo.org>
Mon, 7 Nov 2011 20:18:54 +0000 (15:18 -0500)
Newer gcc is better at detecting set-but-unused variables.

Signed-off-by: Mike Frysinger <vapier@gentoo.org>
src/fccache.c
src/fcdir.c
src/fcformat.c
src/fcfreetype.c

index 2d4a4377ba42145cc5ca6b25239db1dc96f1e197..2fd74549ac8f236f7b5dd457a4c709ad7e6c4a3a 100644 (file)
@@ -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;
index 8a2b97625066eeb05eeffc014cebb8a749056441..d8b094fbc7eec96a9705117993922002b20883c9 100644 (file)
@@ -235,7 +235,6 @@ FcCache *
 FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
 {
     FcStrSet           *dirs;
-    FcBool             ret = FcTrue;
     FcFontSet          *set;
     FcCache            *cache = NULL;
     struct stat                dir_stat;
@@ -244,44 +243,28 @@ FcDirCacheScan (const FcChar8 *dir, FcConfig *config)
        printf ("cache scan dir %s\n", dir);
 
     if (FcStat (dir, &dir_stat) < 0)
-    {
-       if (errno != ENOENT)
-           ret = FcFalse;
        goto bail;
-    }
 
     set = FcFontSetCreate();
     if (!set)
-    {
-       ret = FcFalse;
        goto bail;
-    }
 
     dirs = FcStrSetCreate ();
     if (!dirs)
-    {
-       ret = FcFalse;
        goto bail1;
-    }
 
     /*
      * Scan the dir
      */
     if (!FcDirScanConfig (set, dirs, NULL, dir, FcTrue, config))
-    {
-       ret = FcFalse;
        goto bail2;
-    }
 
     /*
      * Build the cache object
      */
     cache = FcDirCacheBuild (set, dir, &dir_stat, dirs);
     if (!cache)
-    {
-       ret = FcFalse;
        goto bail2;
-    }
 
     /*
      * Write out the cache file, ignoring any troubles
index d8518f458252fba1abc6ee4b54111807c750a7c7..c4ac06c9a8a861261755e4074ee2972fc902a900 100644 (file)
@@ -353,13 +353,11 @@ skip_subexpr (FcFormatContext *c);
 static FcBool
 skip_percent (FcFormatContext *c)
 {
-    int width;
-
     if (!expect_char (c, '%'))
        return FcFalse;
 
     /* skip an optional width specifier */
-    width = strtol ((const char *) c->format, (char **) &c->format, 10);
+    strtol ((const char *) c->format, (char **) &c->format, 10);
 
     if (!expect_char (c, '{'))
        return FcFalse;
index d37af2d0eff9113a5a8ae74467016e3dd346c712..56ee380cd649c7894c99a175803df6e2e2b59778 100644 (file)
@@ -2869,14 +2869,11 @@ GetScriptTags(FT_Face face, FT_ULong tabletag, FT_ULong **stags)
     FT_Stream  stream = face->stream;
     FT_Error   error;
     FT_UShort  n, p;
-    FT_Memory  memory;
     int        script_count;
 
     if (!stream)
         return 0;
 
-    memory = stream->memory;
-
     if (( error = ftglue_face_goto_table( face, tabletag, stream ) ))
        return 0;