summaryrefslogtreecommitdiff
path: root/gs/src/gp_unix.c
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2008-05-08 19:56:33 +0000
committerRay Johnston <ray.johnston@artifex.com>2008-05-08 19:56:33 +0000
commitcc6f1fc3c3cdd76bfdae6a65e8b5ec793d4b0eda (patch)
treee747081b91f5e4bb84a371a37762f6220705d795 /gs/src/gp_unix.c
parent165f630fd7405e975310bb3e1c20db264a38012b (diff)
Fix gcc warnings, unused variables and type mismatch, implicit declaration.
git-svn-id: http://svn.ghostscript.com/ghostscript/trunk@8717 a1074d23-0009-0410-80fe-cf8c14f379e6
Diffstat (limited to 'gs/src/gp_unix.c')
-rw-r--r--gs/src/gp_unix.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/gs/src/gp_unix.c b/gs/src/gp_unix.c
index 1b7967cd3..1079f3410 100644
--- a/gs/src/gp_unix.c
+++ b/gs/src/gp_unix.c
@@ -341,9 +341,8 @@ void *gp_enumerate_fonts_init(gs_memory_t *mem)
int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path)
{
#ifdef HAVE_FONTCONFIG
- char* psname = NULL;
-
unix_fontenum_t* state = (unix_fontenum_t *)enum_state;
+
if (state == NULL) {
return 0; /* gp_enumerate_fonts_init failed for some reason */
}
@@ -393,8 +392,8 @@ int gp_enumerate_fonts_next(void *enum_state, char **fontname, char **path)
/* Gross hack to work around Fontconfig's inability to tell
* us the font's PostScript name - generate it ourselves.
* We must free the memory allocated here next time around. */
- makePSFontName((char *)family_fc, weight_fc, slant_fc, &state->name, sizeof(state->name));
- *fontname = &state->name;
+ makePSFontName((char *)family_fc, weight_fc, slant_fc, (char *)&state->name, sizeof(state->name));
+ *fontname = (char *)&state->name;
/* return the font path straight out of fontconfig */
*path = (char*)file_fc;