diff options
-rw-r--r-- | ChangeLog | 19 | ||||
-rw-r--r-- | pango-view/viewer-main.c | 4 | ||||
-rw-r--r-- | pango-view/viewer-pangocairo.c | 16 | ||||
-rw-r--r-- | pango-view/viewer-pangoft2.c | 22 | ||||
-rw-r--r-- | pango-view/viewer-pangox.c | 2 | ||||
-rw-r--r-- | pango-view/viewer-pangoxft.c | 4 | ||||
-rw-r--r-- | pango-view/viewer-render.c | 28 | ||||
-rw-r--r-- | pango-view/viewer-x.c | 2 |
8 files changed, 58 insertions, 39 deletions
@@ -1,5 +1,24 @@ 2008-12-25 Behdad Esfahbod <behdad@gnome.org> + * pango-view/viewer-main.c (main): + * pango-view/viewer-pangocairo.c (pangocairo_view_create), + (transform_callback), (pangocairo_view_render), + (pangocairo_view_write): + * pango-view/viewer-pangoft2.c (substitute_func), + (pangoft2_view_create), (pangoft2_view_create_surface), + (pangoft2_view_destroy_surface), (render_callback), + (pangoft2_view_render), (pangoft2_view_write): + * pango-view/viewer-pangox.c (render_callback): + * pango-view/viewer-pangoxft.c (default_substitute), + (render_callback): + * pango-view/viewer-render.c (parse_enum), (parse_align), + (parse_ellipsis), (parse_gravity), (parse_gravity_hint), + (parse_hinting), (parse_wrap), (parse_backend), (show_version): + * pango-view/viewer-x.c (x_view_init): + Fix all warnings in pango-view/ + +2008-12-25 Behdad Esfahbod <behdad@gnome.org> + * pango/pangofc-fontmap.c (pango_fc_font_map_finalize), (pango_fc_font_map_shutdown): Cleanup fontmap finalization. diff --git a/pango-view/viewer-main.c b/pango-view/viewer-main.c index 6c530021..8523ee38 100644 --- a/pango-view/viewer-main.c +++ b/pango-view/viewer-main.c @@ -86,7 +86,7 @@ main (int argc, convert_argv[2] = opt_output; - if (!g_spawn_async_with_pipes (NULL, (gchar **)convert_argv, NULL, + if (!g_spawn_async_with_pipes (NULL, (gchar **)(void*)convert_argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | @@ -141,7 +141,7 @@ main (int argc, fail ("%s viewer backend does not support displaying or writing", view->name); display_argv[2] = title; - if (!g_spawn_async_with_pipes (NULL, (gchar **)display_argv, NULL, + if (!g_spawn_async_with_pipes (NULL, (gchar **)(void*)display_argv, NULL, G_SPAWN_DO_NOT_REAP_CHILD | G_SPAWN_SEARCH_PATH | G_SPAWN_STDOUT_TO_DEV_NULL | diff --git a/pango-view/viewer-pangocairo.c b/pango-view/viewer-pangocairo.c index 97946eb8..e9e46708 100644 --- a/pango-view/viewer-pangocairo.c +++ b/pango-view/viewer-pangocairo.c @@ -38,7 +38,7 @@ typedef struct /* TODO: hinting */ static gpointer -pangocairo_view_create (const PangoViewer *klass) +pangocairo_view_create (const PangoViewer *klass G_GNUC_UNUSED) { CairoViewer *instance; @@ -279,7 +279,7 @@ static void transform_callback (PangoContext *context, PangoMatrix *matrix, gpointer cr_context, - gpointer state) + gpointer state G_GNUC_UNUSED) { cairo_t *cr = (cairo_t *)cr_context; cairo_matrix_t cairo_matrix; @@ -304,11 +304,11 @@ transform_callback (PangoContext *context, } static void -pangocairo_view_render (gpointer instance, +pangocairo_view_render (gpointer instance G_GNUC_UNUSED, gpointer surface, PangoContext *context, - int width, - int height, + int width G_GNUC_UNUSED, + int height G_GNUC_UNUSED, gpointer state) { cairo_t *cr; @@ -355,11 +355,11 @@ write_func (void *closure, } static void -pangocairo_view_write (gpointer instance, +pangocairo_view_write (gpointer instance G_GNUC_UNUSED, gpointer surface, FILE *stream, - int width, - int height) + int width G_GNUC_UNUSED, + int height G_GNUC_UNUSED) { CairoSurface *c_surface = (CairoSurface *) surface; diff --git a/pango-view/viewer-pangoft2.c b/pango-view/viewer-pangoft2.c index f991ad15..1bf114cc 100644 --- a/pango-view/viewer-pangoft2.c +++ b/pango-view/viewer-pangoft2.c @@ -32,7 +32,7 @@ static void substitute_func (FcPattern *pattern, - gpointer data) + gpointer data G_GNUC_UNUSED) { if (opt_hinting != HINT_DEFAULT) { @@ -45,7 +45,7 @@ substitute_func (FcPattern *pattern, } static gpointer -pangoft2_view_create (const PangoViewer *klass) +pangoft2_view_create (const PangoViewer *klass G_GNUC_UNUSED) { PangoFontMap *fontmap; fontmap = pango_ft2_font_map_new (); @@ -69,7 +69,7 @@ pangoft2_view_get_context (gpointer instance) } static gpointer -pangoft2_view_create_surface (gpointer instance, +pangoft2_view_create_surface (gpointer instance G_GNUC_UNUSED, int width, int height) { @@ -88,7 +88,7 @@ pangoft2_view_create_surface (gpointer instance, } static void -pangoft2_view_destroy_surface (gpointer instance, +pangoft2_view_destroy_surface (gpointer instance G_GNUC_UNUSED, gpointer surface) { FT_Bitmap *bitmap = (FT_Bitmap *) surface; @@ -102,7 +102,7 @@ render_callback (PangoLayout *layout, int x, int y, gpointer context, - gpointer state) + gpointer state G_GNUC_UNUSED) { pango_ft2_render_layout ((FT_Bitmap *)context, layout, @@ -110,11 +110,11 @@ render_callback (PangoLayout *layout, } static void -pangoft2_view_render (gpointer instance, +pangoft2_view_render (gpointer instance G_GNUC_UNUSED, gpointer surface, PangoContext *context, - int width, - int height, + int width G_GNUC_UNUSED, + int height G_GNUC_UNUSED, gpointer state) { int pix_idx; @@ -127,13 +127,13 @@ pangoft2_view_render (gpointer instance, } static void -pangoft2_view_write (gpointer instance, +pangoft2_view_write (gpointer instance G_GNUC_UNUSED, gpointer surface, FILE *stream, int width, int height) { - int row; + int row, bytes; FT_Bitmap *bitmap = (FT_Bitmap *) surface; /* Write it as pgm to output */ @@ -142,7 +142,7 @@ pangoft2_view_write (gpointer instance, "%d %d\n" "255\n", width, height); for (row = 0; row < height; row++) - fwrite(bitmap->buffer + row * bitmap->pitch, 1, width, stream); + bytes = fwrite(bitmap->buffer + row * bitmap->pitch, 1, width, stream); } const PangoViewer pangoft2_viewer = { diff --git a/pango-view/viewer-pangox.c b/pango-view/viewer-pangox.c index f48081a7..dff77cbf 100644 --- a/pango-view/viewer-pangox.c +++ b/pango-view/viewer-pangox.c @@ -64,7 +64,7 @@ render_callback (PangoLayout *layout, int x, int y, gpointer context, - gpointer state) + gpointer state G_GNUC_UNUSED) { MyXContext *x_context = (MyXContext *) context; diff --git a/pango-view/viewer-pangoxft.c b/pango-view/viewer-pangoxft.c index 1a10f5c4..14e8c355 100644 --- a/pango-view/viewer-pangoxft.c +++ b/pango-view/viewer-pangoxft.c @@ -27,7 +27,7 @@ static void default_substitute (FcPattern *pattern, - gpointer data) + gpointer data G_GNUC_UNUSED) { FcPatternDel (pattern, FC_DPI); FcPatternAddInteger (pattern, FC_DPI, opt_dpi); @@ -86,7 +86,7 @@ render_callback (PangoLayout *layout, int x, int y, gpointer context, - gpointer state) + gpointer state G_GNUC_UNUSED) { MyXftContext *xft_context = (MyXftContext *) context; diff --git a/pango-view/viewer-render.c b/pango-view/viewer-render.c index 2aa1f6a8..4d709bd6 100644 --- a/pango-view/viewer-render.c +++ b/pango-view/viewer-render.c @@ -365,7 +365,7 @@ parse_enum (GType type, int *value, const char *name, const char *arg, - gpointer data, + gpointer data G_GNUC_UNUSED, GError **error) { char *possible_values = NULL; @@ -399,7 +399,7 @@ parse_align (const char *name, gpointer data, GError **error) { - return parse_enum (PANGO_TYPE_ALIGNMENT, &opt_align, + return parse_enum (PANGO_TYPE_ALIGNMENT, (int*)(void*)&opt_align, name, arg, data, error); } @@ -409,7 +409,7 @@ parse_ellipsis (const char *name, gpointer data, GError **error) { - return parse_enum (PANGO_TYPE_ELLIPSIZE_MODE, &opt_ellipsize, + return parse_enum (PANGO_TYPE_ELLIPSIZE_MODE, (int*)(void*)&opt_ellipsize, name, arg, data, error); } @@ -419,7 +419,7 @@ parse_gravity (const char *name, gpointer data, GError **error) { - return parse_enum (PANGO_TYPE_GRAVITY, &opt_gravity, + return parse_enum (PANGO_TYPE_GRAVITY, (int*)(void*)&opt_gravity, name, arg, data, error); } @@ -429,14 +429,14 @@ parse_gravity_hint (const char *name, gpointer data, GError **error) { - return parse_enum (PANGO_TYPE_GRAVITY_HINT, &opt_gravity_hint, + return parse_enum (PANGO_TYPE_GRAVITY_HINT, (int*)(void*)&opt_gravity_hint, name, arg, data, error); } static gboolean -parse_hinting (const char *name, +parse_hinting (const char *name G_GNUC_UNUSED, const char *arg, - gpointer data, + gpointer data G_GNUC_UNUSED, GError **error) { gboolean ret = TRUE; @@ -466,7 +466,7 @@ parse_wrap (const char *name, GError **error) { gboolean ret; - if ((ret = parse_enum (PANGO_TYPE_WRAP_MODE, &opt_wrap, + if ((ret = parse_enum (PANGO_TYPE_WRAP_MODE, (int*)(void*)&opt_wrap, name, arg, data, error))) { opt_wrap_set = TRUE; @@ -523,9 +523,9 @@ backend_description (void) } static gboolean -parse_backend (const char *name, +parse_backend (const char *name G_GNUC_UNUSED, const char *arg, - gpointer data, + gpointer data G_GNUC_UNUSED, GError **error) { gboolean ret = TRUE; @@ -555,10 +555,10 @@ parse_backend (const char *name, static gboolean -show_version(const char *name, - const char *arg, - gpointer data, - GError **error) +show_version(const char *name G_GNUC_UNUSED, + const char *arg G_GNUC_UNUSED, + gpointer data G_GNUC_UNUSED, + GError **error G_GNUC_UNUSED) { g_printf("%s (%s) %s\n", prog_name, PACKAGE_NAME, PACKAGE_VERSION); g_printf("module interface version: %s\n", MODULE_VERSION); diff --git a/pango-view/viewer-x.c b/pango-view/viewer-x.c index c26ab888..58f1c592 100644 --- a/pango-view/viewer-x.c +++ b/pango-view/viewer-x.c @@ -26,7 +26,7 @@ void x_view_init (gpointer instance, - const PangoViewer *klass) + const PangoViewer *klass G_GNUC_UNUSED) { XViewer *x = (XViewer *)instance; |