Commit a63a6400 authored by Behdad Esfahbod's avatar Behdad Esfahbod Committed by Behdad Esfahbod

Various gcc warning shut-ups. Mostly adding void to function definitions

2005-09-08  Behdad Esfahbod  <behdad@gnome.org>

        * gucharmap/*.[ch]: Various gcc warning shut-ups.  Mostly adding void
        to function definitions with no parameter.
parent 18c83aaa
2005-09-08 Behdad Esfahbod <behdad@gnome.org>
* gucharmap/*.[ch]: Various gcc warning shut-ups. Mostly adding void
to function definitions with no parameter.
2005-09-08 Behdad Esfahbod <behdad@gnome.org>
* configure.ac: Bumped version /up/ to 1.4.4-cvs.
......
......@@ -199,7 +199,7 @@ gucharmap_block_chapters_class_init (GucharmapBlockChaptersClass *clazz)
}
GType
gucharmap_block_chapters_get_type ()
gucharmap_block_chapters_get_type (void)
{
static GType t = 0;
......@@ -226,7 +226,7 @@ gucharmap_block_chapters_get_type ()
}
GtkWidget *
gucharmap_block_chapters_new ()
gucharmap_block_chapters_new (void)
{
return GTK_WIDGET (g_object_new (gucharmap_block_chapters_get_type (), NULL));
}
......
......@@ -51,8 +51,8 @@ struct _GucharmapBlockChaptersClass
GucharmapChaptersClass parent_class;
};
GType gucharmap_block_chapters_get_type ();
GtkWidget * gucharmap_block_chapters_new ();
GType gucharmap_block_chapters_get_type (void);
GtkWidget * gucharmap_block_chapters_new (void);
G_END_DECLS
......
......@@ -59,7 +59,7 @@ gucharmap_chapters_class_init (GucharmapChaptersClass *clazz)
}
GType
gucharmap_chapters_get_type ()
gucharmap_chapters_get_type (void)
{
static GType t = 0;
......
......@@ -61,7 +61,7 @@ struct _GucharmapChaptersClass
gunichar wc);
};
GType gucharmap_chapters_get_type ();
GType gucharmap_chapters_get_type (void);
GucharmapCodepointList * gucharmap_chapters_get_codepoint_list (GucharmapChapters *chapters);
G_CONST_RETURN GucharmapCodepointList * gucharmap_chapters_get_book_codepoint_list (GucharmapChapters *chapters);
gboolean gucharmap_chapters_go_to_character (GucharmapChapters *chapters,
......
......@@ -58,7 +58,7 @@ charmap_finalize (GObject *object)
gdk_cursor_unref (charmap->regular_cursor);
}
void
static void
gucharmap_charmap_class_init (GucharmapCharmapClass *clazz)
{
clazz->status_message = NULL;
......@@ -148,7 +148,7 @@ insert_chocolate_detail_codepoints (GucharmapCharmap *charmap,
static const gchar *
find_codepoint (const gchar *str)
{
gint i;
guint i;
/* what we are searching for is ascii; in this case, we don't have to
* worry about multibyte characters at all */
......@@ -237,7 +237,7 @@ conditionally_insert_canonical_decomposition (GucharmapCharmap *charmap,
{
gunichar *decomposition;
gsize result_len;
gint i;
guint i;
decomposition = gucharmap_unicode_canonical_decomposition (uc, &result_len);
......@@ -286,8 +286,8 @@ set_details (GucharmapCharmap *charmap,
n = gucharmap_unichar_to_printable_utf8 (uc, buf);
if (n == 0)
gtk_text_buffer_insert_with_tags_by_name (
buffer, &iter, _("[not a printable character]"), -1, NULL);
gtk_text_buffer_insert (
buffer, &iter, _("[not a printable character]"), -1);
else
gtk_text_buffer_insert_with_tags_by_name (buffer, &iter, buf, n,
"gimongous", NULL);
......@@ -312,7 +312,7 @@ set_details (GucharmapCharmap *charmap,
insert_heading (charmap, buffer, &iter, _("Various Useful Representations"));
n = g_unichar_to_utf8 (uc, ubuf);
n = g_unichar_to_utf8 (uc, (gchar *)ubuf);
/* UTF-8 */
gstemp = g_string_new (NULL);
......@@ -787,7 +787,7 @@ gucharmap_charmap_get_type (void)
NULL, /* class_data */
sizeof (GucharmapCharmap),
0, /* n_preallocs */
(GInstanceInitFunc) gucharmap_charmap_init,
(GInstanceInitFunc) gucharmap_charmap_init
};
gucharmap_charmap_type = g_type_register_static (GTK_TYPE_HPANED,
......@@ -818,7 +818,7 @@ gucharmap_charmap_go_to_character (GucharmapCharmap *charmap,
if (!status)
g_warning ("gucharmap_chapters_go_to_character failed (%04X)\n", wc);
if (wc >= 0 && wc <= UNICHAR_MAX)
if (wc <= UNICHAR_MAX)
gucharmap_table_set_active_character (charmap->chartable, wc);
}
......
......@@ -38,7 +38,7 @@ default_get_char (GucharmapCodepointList *list,
{
DefaultCodepointListPrivate *priv = GUCHARMAP_CODEPOINT_LIST_GET_PRIVATE (list);
if (index > priv->end - priv->start)
if (index > (gint)priv->end - priv->start)
return (gunichar)(-1);
else
return (gunichar) priv->start + index;
......@@ -76,7 +76,7 @@ gucharmap_codepoint_list_class_init (GucharmapCodepointListClass *clazz)
}
GType
gucharmap_codepoint_list_get_type ()
gucharmap_codepoint_list_get_type (void)
{
static GType t = 0;
......
......@@ -56,7 +56,7 @@ struct _GucharmapCodepointListClass
gunichar wc);
};
GType gucharmap_codepoint_list_get_type ();
GType gucharmap_codepoint_list_get_type (void);
GucharmapCodepointList * gucharmap_codepoint_list_new (gunichar start,
gunichar end);
gunichar gucharmap_codepoint_list_get_char (GucharmapCodepointList *list,
......
/* $Id$ */
#include "config.h"
#include "gucharmap-intl.h"
#ifdef ENABLE_NLS
......
/* $Id$ */
#ifndef GUCHARMAP_INTL_H
#define GUCHARMAP_INTL_H
#include "config.h"
......
......@@ -251,7 +251,7 @@ gucharmap_mini_font_selection_init (GucharmapMiniFontSelection *fontsel)
GtkWidget *
gucharmap_mini_font_selection_new ()
gucharmap_mini_font_selection_new (void)
{
return GTK_WIDGET (g_object_new (gucharmap_mini_font_selection_get_type (),
NULL));
......@@ -259,7 +259,7 @@ gucharmap_mini_font_selection_new ()
GType
gucharmap_mini_font_selection_get_type ()
gucharmap_mini_font_selection_get_type (void)
{
static GType gucharmap_mini_font_selection_type = 0;
......
......@@ -61,8 +61,8 @@ struct _GucharmapMiniFontSelectionClass
void (* changed) (GucharmapMiniFontSelection *fontsel);
};
GType gucharmap_mini_font_selection_get_type ();
GtkWidget * gucharmap_mini_font_selection_new ();
GType gucharmap_mini_font_selection_get_type (void);
GtkWidget * gucharmap_mini_font_selection_new (void);
gboolean gucharmap_mini_font_selection_set_font_name (GucharmapMiniFontSelection *fontsel,
const gchar *fontname);
gchar * gucharmap_mini_font_selection_get_font_name (GucharmapMiniFontSelection *fontsel);
......
......@@ -209,7 +209,7 @@ gucharmap_script_chapters_class_init (GucharmapScriptChaptersClass *clazz)
}
GType
gucharmap_script_chapters_get_type ()
gucharmap_script_chapters_get_type (void)
{
static GType t = 0;
......@@ -236,7 +236,7 @@ gucharmap_script_chapters_get_type ()
}
GtkWidget *
gucharmap_script_chapters_new ()
gucharmap_script_chapters_new (void)
{
return GTK_WIDGET (g_object_new (gucharmap_script_chapters_get_type (), NULL));
}
......
......@@ -49,8 +49,8 @@ struct _GucharmapScriptChaptersClass
GucharmapChaptersClass parent_class;
};
GType gucharmap_script_chapters_get_type ();
GtkWidget * gucharmap_script_chapters_new ();
GType gucharmap_script_chapters_get_type (void);
GtkWidget * gucharmap_script_chapters_new (void);
G_END_DECLS
......
......@@ -267,7 +267,7 @@ gucharmap_script_codepoint_list_init (GucharmapScriptCodepointList *guscl)
}
GType
gucharmap_script_codepoint_list_get_type ()
gucharmap_script_codepoint_list_get_type (void)
{
static GType t = 0;
......@@ -303,7 +303,7 @@ gucharmap_script_codepoint_list_get_type ()
* g_object_unref() to free the result.
**/
GucharmapCodepointList *
gucharmap_script_codepoint_list_new ()
gucharmap_script_codepoint_list_new (void)
{
return GUCHARMAP_CODEPOINT_LIST (g_object_new (gucharmap_script_codepoint_list_get_type (), NULL));
}
......@@ -419,7 +419,7 @@ gucharmap_script_codepoint_list_append_script (GucharmapScriptCodepointList *li
* should be modified by the caller.
**/
G_CONST_RETURN gchar **
gucharmap_unicode_list_scripts ()
gucharmap_unicode_list_scripts (void)
{
return unicode_script_list;
}
......
......@@ -52,8 +52,8 @@ struct _GucharmapScriptCodepointListClass
GucharmapCodepointListClass parent_class;
};
GType gucharmap_script_codepoint_list_get_type ();
GucharmapCodepointList * gucharmap_script_codepoint_list_new ();
GType gucharmap_script_codepoint_list_get_type (void);
GucharmapCodepointList * gucharmap_script_codepoint_list_new (void);
gboolean gucharmap_script_codepoint_list_set_script (GucharmapScriptCodepointList *list,
const gchar *script);
gboolean gucharmap_script_codepoint_list_set_scripts (GucharmapScriptCodepointList *list,
......
......@@ -673,7 +673,7 @@ gucharmap_search_dialog_class_init (GucharmapSearchDialogClass *clazz)
}
GType
gucharmap_search_dialog_get_type ()
gucharmap_search_dialog_get_type (void)
{
static GType t = 0;
......
......@@ -49,11 +49,11 @@ struct _GucharmapSearchDialogClass
GtkDialogClass parent_class;
/* signals */
void (* search_start) ();
void (* search_start) (void);
void (* search_finish) (gunichar found_char);
};
GType gucharmap_search_dialog_get_type ();
GType gucharmap_search_dialog_get_type (void);
GtkWidget * gucharmap_search_dialog_new (GucharmapWindow *parent);
void gucharmap_search_dialog_start_search (GucharmapSearchDialog *search_dialog,
GucharmapDirection direction);
......
......@@ -511,7 +511,7 @@ set_active_cell (GucharmapTable *chartable,
chartable->active_cell = cell;
/* update page, if necessary */
if (cell - chartable->page_first_cell >= chartable->rows * chartable->cols)
if ((gint)cell - chartable->page_first_cell >= chartable->rows * chartable->cols)
{
/* move the page_first_cell as far as active_cell has moved */
gint offset = (gint) chartable->active_cell - (gint) chartable->old_active_cell;
......@@ -635,12 +635,12 @@ draw_character (GucharmapTable *chartable,
cell = get_cell_at_rowcol (chartable, row, col);
wc = gucharmap_codepoint_list_get_char (chartable->codepoint_list, cell);
if (wc < 0 || wc > UNICHAR_MAX || !gucharmap_unichar_validate (wc) || !gucharmap_unichar_isdefined (wc))
if (wc > UNICHAR_MAX || !gucharmap_unichar_validate (wc) || !gucharmap_unichar_isdefined (wc))
return;
if (GTK_WIDGET_HAS_FOCUS (chartable->drawing_area) && cell == chartable->active_cell)
if (GTK_WIDGET_HAS_FOCUS (chartable->drawing_area) && (gint)cell == chartable->active_cell)
gc = chartable->drawing_area->style->text_gc[GTK_STATE_SELECTED];
else if (cell == chartable->active_cell)
else if ((gint)cell == chartable->active_cell)
gc = chartable->drawing_area->style->text_gc[GTK_STATE_ACTIVE];
else
gc = chartable->drawing_area->style->text_gc[GTK_STATE_NORMAL];
......@@ -677,11 +677,11 @@ draw_square_bg (GucharmapTable *chartable, gint row, gint col)
gc = gdk_gc_new (GDK_DRAWABLE (chartable->drawing_area->window));
if (GTK_WIDGET_HAS_FOCUS (chartable->drawing_area) && cell == chartable->active_cell)
if (GTK_WIDGET_HAS_FOCUS (chartable->drawing_area) && (gint)cell == chartable->active_cell)
untinted = chartable->drawing_area->style->base[GTK_STATE_SELECTED];
else if (cell == chartable->active_cell)
else if ((gint)cell == chartable->active_cell)
untinted = chartable->drawing_area->style->base[GTK_STATE_ACTIVE];
else if (cell > gucharmap_codepoint_list_get_last_index (chartable->codepoint_list))
else if ((gint)cell > gucharmap_codepoint_list_get_last_index (chartable->codepoint_list))
untinted = chartable->drawing_area->style->dark[GTK_STATE_NORMAL];
else if (! gucharmap_unichar_validate (wc))
untinted = chartable->drawing_area->style->fg[GTK_STATE_INSENSITIVE];
......@@ -1383,7 +1383,7 @@ motion_notify_event (GtkWidget *widget,
{
guint cell = get_cell_at_xy (chartable, MAX (0, event->x), MAX (0, event->y));
if (cell != chartable->active_cell)
if ((gint)cell != chartable->active_cell)
{
gtk_widget_hide (chartable->zoom_window);
set_active_cell (chartable, cell);
......@@ -1676,7 +1676,7 @@ gucharmap_table_get_type (void)
NULL, /* class_data */
sizeof (GucharmapTable),
0, /* n_preallocs */
(GInstanceInitFunc) gucharmap_table_init,
(GInstanceInitFunc) gucharmap_table_init
};
gucharmap_table_type = g_type_register_static (GTK_TYPE_HBOX, "GucharmapTable",
......
......@@ -236,7 +236,7 @@ gucharmap_get_unicode_data_name (gunichar uc)
}
gint
gucharmap_get_unicode_data_name_count ()
gucharmap_get_unicode_data_name_count (void)
{
return G_N_ELEMENTS (unicode_names);
}
......@@ -244,7 +244,7 @@ gucharmap_get_unicode_data_name_count ()
#if ENABLE_UNIHAN
gint
gucharmap_get_unihan_count ()
gucharmap_get_unihan_count (void)
{
return G_N_ELEMENTS (unihan);
}
......@@ -445,6 +445,8 @@ get_nameslist (gunichar uc)
return NULL;
}
gboolean _gucharmap_unicode_has_nameslist_entry (gunichar uc);
gboolean
_gucharmap_unicode_has_nameslist_entry (gunichar uc)
{
......
......@@ -27,9 +27,9 @@ G_BEGIN_DECLS
/* return values are read-only */
G_CONST_RETURN gchar * gucharmap_get_unicode_name (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_data_name (gunichar uc);
gint gucharmap_get_unicode_data_name_count ();
gint gucharmap_get_unicode_data_name_count (void);
G_CONST_RETURN gchar * gucharmap_get_unicode_category_name (gunichar uc);
gint gucharmap_get_unihan_count ();
gint gucharmap_get_unihan_count (void);
G_CONST_RETURN gchar * gucharmap_get_unicode_kDefinition (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_kCantonese (gunichar uc);
G_CONST_RETURN gchar * gucharmap_get_unicode_kMandarin (gunichar uc);
......@@ -60,7 +60,7 @@ gboolean gucharmap_unichar_isdefined (gunichar wc)
gboolean gucharmap_unichar_isgraph (gunichar wc);
/* defined in gucharmap-script-codepoint-list.c */
G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts ();
G_CONST_RETURN gchar ** gucharmap_unicode_list_scripts (void);
G_CONST_RETURN gchar * gucharmap_unicode_get_script_for_char (gunichar wc);
G_END_DECLS
......
......@@ -120,7 +120,7 @@ update_progress_bar (GucharmapWindow *guw)
* from mozilla
* caller should gdk_cursor_unref */
GdkCursor *
_gucharmap_window_progress_cursor ()
_gucharmap_window_progress_cursor (void)
{
/* MOZ_CURSOR_SPINNING */
static const char moz_spinning_bits[] =
......@@ -737,7 +737,7 @@ make_text_to_copy (GucharmapWindow *guw)
return hbox;
}
void
static void
load_icon (GucharmapWindow *guw)
{
GucharmapWindowPrivate *priv = GUCHARMAP_WINDOW_GET_PRIVATE (guw);
......@@ -897,7 +897,7 @@ gucharmap_window_class_init (GucharmapWindowClass *clazz)
}
GType
gucharmap_window_get_type ()
gucharmap_window_get_type (void)
{
static GType gucharmap_window_type = 0;
......@@ -913,7 +913,7 @@ gucharmap_window_get_type ()
NULL,
sizeof (GucharmapWindow),
0,
(GInstanceInitFunc) gucharmap_window_init,
(GInstanceInitFunc) gucharmap_window_init
};
gucharmap_window_type = g_type_register_static (GTK_TYPE_WINDOW,
......@@ -926,7 +926,7 @@ gucharmap_window_get_type ()
}
GtkWidget *
gucharmap_window_new ()
gucharmap_window_new (void)
{
return GTK_WIDGET (g_object_new (gucharmap_window_get_type (), NULL));
}
......
......@@ -48,8 +48,8 @@ struct _GucharmapWindowClass
GtkWindowClass parent_class;
};
GType gucharmap_window_get_type ();
GtkWidget * gucharmap_window_new ();
GType gucharmap_window_get_type (void);
GtkWidget * gucharmap_window_new (void);
void gucharmap_window_set_font_selection_visible (GucharmapWindow *guw,
gboolean visible);
void gucharmap_window_set_text_to_copy_visible (GucharmapWindow *guw,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment