[PATCH:libXfont 1/4] Fix unused variable 'dir' warnings

Jasper St. Pierre jstpierre at mecheye.net
Tue Jan 7 23:59:56 PST 2014


For the series:

Reviewed-by: Jasper St. Pierre <jstpierre at mecheye.net>


On Wed, Jan 8, 2014 at 2:35 AM, Alan Coopersmith <
alan.coopersmith at oracle.com> wrote:

> catalogue.c: In function 'CatalogueOpenFont':
> catalogue.c:290:22: warning: variable 'dir' set but not used
> [-Wunused-but-set-variable]
> catalogue.c: In function 'CatalogueListFonts':
> catalogue.c:324:22: warning: variable 'dir' set but not used
> [-Wunused-but-set-variable]
> fpe.c: In function 'BuiltinResetFPE':
> fpe.c:57:22: warning: variable 'dir' set but not used
> [-Wunused-but-set-variable]
>
> Signed-off-by: Alan Coopersmith <alan.coopersmith at oracle.com>
> ---
>  src/builtins/fpe.c       |    3 ---
>  src/fontfile/catalogue.c |    4 ----
>  2 files changed, 7 deletions(-)
>
> diff --git a/src/builtins/fpe.c b/src/builtins/fpe.c
> index 83905da..689f22a 100644
> --- a/src/builtins/fpe.c
> +++ b/src/builtins/fpe.c
> @@ -54,9 +54,6 @@ BuiltinInitFPE (FontPathElementPtr fpe)
>  static int
>  BuiltinResetFPE (FontPathElementPtr fpe)
>  {
> -    FontDirectoryPtr   dir;
> -
> -    dir = (FontDirectoryPtr) fpe->private;
>      /* builtins can't change! */
>      return Successful;
>  }
> diff --git a/src/fontfile/catalogue.c b/src/fontfile/catalogue.c
> index 09ca2ae..6b6fc09 100644
> --- a/src/fontfile/catalogue.c
> +++ b/src/fontfile/catalogue.c
> @@ -287,7 +287,6 @@ CatalogueOpenFont (pointer client, FontPathElementPtr
> fpe, Mask flags,
>  {
>      CataloguePtr cat = fpe->private;
>      FontPathElementPtr subfpe;
> -    FontDirectoryPtr dir;
>      int i, status;
>
>      CatalogueRescan (fpe, FALSE);
> @@ -295,7 +294,6 @@ CatalogueOpenFont (pointer client, FontPathElementPtr
> fpe, Mask flags,
>      for (i = 0; i < cat->fpeCount; i++)
>      {
>         subfpe = cat->fpeList[i];
> -       dir = subfpe->private;
>         status = FontFileOpenFont(client, subfpe, flags,
>                                   name, namelen, format, fmask, id,
>                                   pFont, aliasName, non_cachable_font);
> @@ -321,7 +319,6 @@ CatalogueListFonts (pointer client, FontPathElementPtr
> fpe, char *pat,
>  {
>      CataloguePtr cat = fpe->private;
>      FontPathElementPtr subfpe;
> -    FontDirectoryPtr dir;
>      int i;
>
>      CatalogueRescan (fpe, FALSE);
> @@ -329,7 +326,6 @@ CatalogueListFonts (pointer client, FontPathElementPtr
> fpe, char *pat,
>      for (i = 0; i < cat->fpeCount; i++)
>      {
>         subfpe = cat->fpeList[i];
> -       dir = subfpe->private;
>         FontFileListFonts(client, subfpe, pat, len, max, names);
>      }
>
> --
> 1.7.9.2
>
> _______________________________________________
> xorg-devel at lists.x.org: X.Org development
> Archives: http://lists.x.org/archives/xorg-devel
> Info: http://lists.x.org/mailman/listinfo/xorg-devel
>



-- 
  Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20140108/8b01f9e4/attachment-0001.html>


More information about the xorg-devel mailing list