diff options
author | Padraig O'Briain <padraigo@src.gnome.org> | 2001-05-24 13:55:25 +0000 |
---|---|---|
committer | Padraig O'Briain <padraigo@src.gnome.org> | 2001-05-24 13:55:25 +0000 |
commit | 349e73fccfc5e59cc65474d2e3b25a0f5207bd0b (patch) | |
tree | 19f03234cf2e776f3ef9e5b565ea50e9e270d91b | |
parent | 00ac261d4d33297087611c3b02be2930127132b4 (diff) | |
download | atk-349e73fccfc5e59cc65474d2e3b25a0f5207bd0b.tar.gz |
atk/atkaction.c, atk/atkcomponent.c, atk/atkeditabletext.c,
* atk/atkaction.c, atk/atkcomponent.c, atk/atkeditabletext.c,
atk/atkhyperlink.c, atk/atkhypertext.c, atk/atkimage.c,
atk/atkregistry.c, atk/atkselection.c, atk/atktable.c,
atk/atktext.c, atk/atkutil.c, atk/atkvalue.c
Fix warnings generated by Sun FORTE compiler
-rw-r--r-- | ChangeLog | 8 | ||||
-rwxr-xr-x | atk/atkaction.c | 4 | ||||
-rwxr-xr-x | atk/atkcomponent.c | 4 | ||||
-rwxr-xr-x | atk/atkeditabletext.c | 4 | ||||
-rwxr-xr-x | atk/atkhyperlink.c | 54 | ||||
-rwxr-xr-x | atk/atkhypertext.c | 4 | ||||
-rwxr-xr-x | atk/atkimage.c | 4 | ||||
-rw-r--r-- | atk/atkregistry.c | 10 | ||||
-rwxr-xr-x | atk/atkselection.c | 4 | ||||
-rwxr-xr-x | atk/atktable.c | 4 | ||||
-rwxr-xr-x | atk/atktext.c | 4 | ||||
-rwxr-xr-x | atk/atkutil.c | 8 | ||||
-rwxr-xr-x | atk/atkvalue.c | 4 |
13 files changed, 66 insertions, 50 deletions
@@ -1,5 +1,13 @@ 2001-05-24 Padraig O'Briain <padraig.obriain@sun.com> + * atk/atkaction.c, atk/atkcomponent.c, atk/atkeditabletext.c, + atk/atkhyperlink.c, atk/atkhypertext.c, atk/atkimage.c, + atk/atkregistry.c, atk/atkselection.c, atk/atktable.c, + atk/atktext.c, atk/atkutil.c, atk/atkvalue.c + Fix warnings generated by Sun FORTE compiler + +2001-05-24 Padraig O'Briain <padraig.obriain@sun.com> + * atk/atkcomponent.c atk/atkvalue.c Remove return calls in functions which return void diff --git a/atk/atkaction.c b/atk/atkaction.c index de941f3..662aa1a 100755 --- a/atk/atkaction.c +++ b/atk/atkaction.c @@ -28,8 +28,8 @@ atk_action_get_type () GTypeInfo tinfo = { sizeof (AtkActionIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atkcomponent.c b/atk/atkcomponent.c index 83339b6..13495c8 100755 --- a/atk/atkcomponent.c +++ b/atk/atkcomponent.c @@ -33,8 +33,8 @@ atk_component_get_type () static const GTypeInfo tinfo = { sizeof (AtkComponentIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atkeditabletext.c b/atk/atkeditabletext.c index e80c6b3..43d2096 100755 --- a/atk/atkeditabletext.c +++ b/atk/atkeditabletext.c @@ -36,8 +36,8 @@ atk_editable_text_get_type () static const GTypeInfo tinfo = { sizeof (AtkEditableTextIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atkhyperlink.c b/atk/atkhyperlink.c index 1ebf04e..0454054 100755 --- a/atk/atkhyperlink.c +++ b/atk/atkhyperlink.c @@ -92,13 +92,14 @@ atk_hyperlink_get_uri (AtkHyperlink *link, { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), NULL); + g_return_val_if_fail (link != NULL, NULL); g_return_val_if_fail (ATK_IS_HYPERLINK (link), NULL); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->get_uri != NULL), NULL); - - return (klass->get_uri) (link, i); + if (klass->get_uri) + return (klass->get_uri) (link, i); + else + return NULL; } /** @@ -120,13 +121,14 @@ atk_hyperlink_get_object (AtkHyperlink *link, { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), NULL); + g_return_val_if_fail (link != NULL, NULL); g_return_val_if_fail (ATK_IS_HYPERLINK (link), NULL); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->get_object != NULL), NULL); - - return (klass->get_object) (link, i); + if (klass->get_object) + return (klass->get_object) (link, i); + else + return NULL; } /** @@ -142,13 +144,14 @@ atk_hyperlink_get_end_index (AtkHyperlink *link) { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), 0); + g_return_val_if_fail (link != NULL, 0); g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->get_end_index != NULL), 0); - - return (klass->get_end_index) (link); + if (klass->get_end_index) + return (klass->get_end_index) (link); + else + return 0; } /** @@ -164,13 +167,14 @@ atk_hyperlink_get_start_index (AtkHyperlink *link) { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), 0); + g_return_val_if_fail (link != NULL, 0); g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->get_start_index != NULL), 0); - - return (klass->get_start_index) (link); + if (klass->get_start_index) + return (klass->get_start_index) (link); + else + return 0; } /** @@ -188,13 +192,14 @@ atk_hyperlink_is_valid (AtkHyperlink *link) { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), FALSE); + g_return_val_if_fail (link != NULL, FALSE); g_return_val_if_fail (ATK_IS_HYPERLINK (link), FALSE); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->is_valid != NULL), FALSE); - - return (klass->is_valid) (link); + if (klass->is_valid) + return (klass->is_valid) (link); + else + return FALSE; } /** @@ -210,13 +215,14 @@ atk_hyperlink_get_n_anchors (AtkHyperlink *link) { AtkHyperlinkClass *klass; - g_return_val_if_fail ((link != NULL), 0); + g_return_val_if_fail (link != NULL, 0); g_return_val_if_fail (ATK_IS_HYPERLINK (link), 0); klass = ATK_HYPERLINK_GET_CLASS (link); - g_return_val_if_fail ((klass->get_n_anchors != NULL), 0); - - return (klass->get_n_anchors) (link); + if (klass->get_n_anchors) + return (klass->get_n_anchors) (link); + else + return 0; } static void atk_hyperlink_action_iface_init (AtkActionIface *iface) diff --git a/atk/atkhypertext.c b/atk/atkhypertext.c index f78639d..7135aae 100755 --- a/atk/atkhypertext.c +++ b/atk/atkhypertext.c @@ -40,8 +40,8 @@ atk_hypertext_get_type () static const GTypeInfo tinfo = { sizeof (AtkHypertextIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, (GInterfaceInitFunc) atk_hypertext_interface_init, }; diff --git a/atk/atkimage.c b/atk/atkimage.c index 81a3dd7..aea64af 100755 --- a/atk/atkimage.c +++ b/atk/atkimage.c @@ -28,8 +28,8 @@ atk_image_get_type () static const GTypeInfo tinfo = { sizeof (AtkImageIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atkregistry.c b/atk/atkregistry.c index 00540a5..b04a767 100644 --- a/atk/atkregistry.c +++ b/atk/atkregistry.c @@ -20,7 +20,7 @@ #include "atkregistry.h" #include "atknoopobjectfactory.h" -static AtkRegistry *default_registry = NULL;; +static AtkRegistry *default_registry = NULL; static void atk_registry_init (AtkRegistry *instance, AtkRegistryClass *klass); @@ -86,8 +86,10 @@ atk_registry_class_finalize (GObjectClass *klass) static void atk_registry_init (AtkRegistry *instance, AtkRegistryClass *klass) { - instance->factory_type_registry = g_hash_table_new (NULL, NULL); - instance->factory_singleton_cache = g_hash_table_new (NULL, NULL); + instance->factory_type_registry = g_hash_table_new ((GHashFunc) NULL, + (GEqualFunc) NULL); + instance->factory_singleton_cache = g_hash_table_new ((GHashFunc) NULL, + (GEqualFunc) NULL); } static AtkRegistry* @@ -97,7 +99,7 @@ atk_registry_new () object = g_object_new (ATK_TYPE_REGISTRY, NULL); - g_return_val_if_fail ((object != NULL), NULL); + g_return_val_if_fail (object != NULL, NULL); g_return_val_if_fail (ATK_IS_REGISTRY (object), NULL); return (AtkRegistry *) object; diff --git a/atk/atkselection.c b/atk/atkselection.c index 54ee722..fa5a946 100755 --- a/atk/atkselection.c +++ b/atk/atkselection.c @@ -28,8 +28,8 @@ atk_selection_get_type () GTypeInfo tinfo = { sizeof (AtkSelectionIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atktable.c b/atk/atktable.c index aab3974..338fb56 100755 --- a/atk/atktable.c +++ b/atk/atktable.c @@ -28,8 +28,8 @@ atk_table_get_type () GTypeInfo tinfo = { sizeof (AtkTableIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; diff --git a/atk/atktext.c b/atk/atktext.c index 0b09096..aee0422 100755 --- a/atk/atktext.c +++ b/atk/atktext.c @@ -77,7 +77,7 @@ atk_text_base_init (gpointer *g_class) ATK_TYPE_TEXT, G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED, G_STRUCT_OFFSET (AtkTextIface, text_changed), - NULL, NULL, + (GSignalAccumulator) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0, G_TYPE_NONE); @@ -87,7 +87,7 @@ atk_text_base_init (gpointer *g_class) ATK_TYPE_TEXT, G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (AtkTextIface, caret_changed), - NULL, NULL, + (GSignalAccumulator) NULL, NULL, g_cclosure_marshal_VOID__INT, G_TYPE_NONE, 1, G_TYPE_INT); diff --git a/atk/atkutil.c b/atk/atkutil.c index e7c26ac..f1b8aa7 100755 --- a/atk/atkutil.c +++ b/atk/atkutil.c @@ -23,7 +23,7 @@ * This file supports the addition and removal of multiple focus handlers * as long as they are all called in the same thread. */ -static AtkFocusTrackerInit focus_tracker_init = NULL; +static AtkFocusTrackerInit focus_tracker_init = (AtkFocusTrackerInit) NULL; static gboolean init_done = FALSE; @@ -51,7 +51,7 @@ typedef struct _FocusTracker FocusTracker; void atk_focus_tracker_init (AtkFocusTrackerInit init) { - if (focus_tracker_init == NULL) + if (!focus_tracker_init) focus_tracker_init = init; } @@ -68,11 +68,11 @@ atk_focus_tracker_init (AtkFocusTrackerInit init) guint atk_add_focus_tracker (AtkFocusTracker focus_tracker) { - g_return_val_if_fail ((focus_tracker != NULL), 0); + g_return_val_if_fail (focus_tracker, 0); if (!init_done) { - if (focus_tracker_init != NULL) + if (focus_tracker_init) { focus_tracker_init (); } diff --git a/atk/atkvalue.c b/atk/atkvalue.c index 65464a8..c85faa0 100755 --- a/atk/atkvalue.c +++ b/atk/atkvalue.c @@ -28,8 +28,8 @@ atk_value_get_type () GTypeInfo tinfo = { sizeof (AtkValueIface), - NULL, - NULL, + (GBaseInitFunc) NULL, + (GBaseFinalizeFunc) NULL, }; |