[yelp] Fixed some compiler warnings
- From: Shaun McCance <shaunm src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] Fixed some compiler warnings
- Date: Fri, 7 May 2010 04:21:01 +0000 (UTC)
commit acd326ba53bff6d7523af15c762c60179ddfe814
Author: Shaun McCance <shaunm gnome org>
Date: Thu May 6 23:20:45 2010 -0500
Fixed some compiler warnings
libyelp/yelp-docbook-document.c | 4 ++--
libyelp/yelp-document.c | 4 ++--
libyelp/yelp-settings.c | 2 +-
libyelp/yelp-simple-document.c | 2 +-
libyelp/yelp-uri.c | 10 +++++-----
src/yelp-application.c | 2 --
6 files changed, 11 insertions(+), 13 deletions(-)
---
diff --git a/libyelp/yelp-docbook-document.c b/libyelp/yelp-docbook-document.c
index a9c097c..7463033 100644
--- a/libyelp/yelp-docbook-document.c
+++ b/libyelp/yelp-docbook-document.c
@@ -772,8 +772,8 @@ transform_finished (YelpTransform *transform,
is finalized. Otherwise, we could crash when YelpTransform frees
its libxslt resources.
*/
- g_object_weak_ref (transform,
- transform_finalized,
+ g_object_weak_ref ((GObject *) transform,
+ (GWeakNotify) transform_finalized,
docbook);
docuri = yelp_uri_get_document_uri (priv->uri);
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index fb5a3ac..1ead2fa 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -817,7 +817,7 @@ yelp_document_signal (YelpDocument *document,
break;
case YELP_DOCUMENT_SIGNAL_ERROR:
request->idle_funcs++;
- request->error = yelp_error_copy (error);
+ request->error = yelp_error_copy ((GError *) error);
g_idle_add ((GSourceFunc) request_idle_error, request);
break;
default:
@@ -843,7 +843,7 @@ yelp_document_error_pending (YelpDocument *document,
if (priv->reqs_pending) {
for (cur = priv->reqs_pending; cur; cur = cur->next) {
request = cur->data;
- request->error = yelp_error_copy (error);
+ request->error = yelp_error_copy ((GError *) error);
request->idle_funcs++;
g_idle_add ((GSourceFunc) request_idle_error, request);
}
diff --git a/libyelp/yelp-settings.c b/libyelp/yelp-settings.c
index 7f2139f..0c8a386 100644
--- a/libyelp/yelp-settings.c
+++ b/libyelp/yelp-settings.c
@@ -959,7 +959,7 @@ yelp_settings_cmp_icons (const gchar *icon1,
else if (eq2)
return 1;
}
- if (icon1 == icon2 == NULL)
+ if (icon1 == NULL && icon2 == NULL)
return 0;
else if (icon2 == NULL)
return -1;
diff --git a/libyelp/yelp-simple-document.c b/libyelp/yelp-simple-document.c
index 658df0c..a566dca 100644
--- a/libyelp/yelp-simple-document.c
+++ b/libyelp/yelp-simple-document.c
@@ -383,7 +383,7 @@ static void
request_cancel (GCancellable *cancellable, Request *request)
{
GSList *cur;
- YelpSimpleDocument *document = request->document;
+ YelpSimpleDocument *document = (YelpSimpleDocument *) request->document;
g_assert (document != NULL && YELP_IS_SIMPLE_DOCUMENT (document));
diff --git a/libyelp/yelp-uri.c b/libyelp/yelp-uri.c
index fa2497e..ee17b75 100644
--- a/libyelp/yelp-uri.c
+++ b/libyelp/yelp-uri.c
@@ -506,17 +506,17 @@ resolve_data_dirs (YelpUri *ret,
const gchar * const *sdatadirs = g_get_system_data_dirs ();
const gchar * const *langs = g_get_language_names ();
/* The strings are still owned by GLib; we just own the array. */
- const gchar **datadirs;
+ gchar **datadirs;
YelpUriPrivate *priv = GET_PRIV (ret);
gchar *filename = NULL;
gchar **searchpath = NULL;
gint searchi, searchmax;
gint datadir_i, subdir_i, lang_i;
- datadirs = g_new0 (gchar *, g_strv_length (sdatadirs) + 2);
- datadirs[0] = g_get_user_data_dir ();
+ datadirs = g_new0 (gchar *, g_strv_length ((gchar **) sdatadirs) + 2);
+ datadirs[0] = (gchar *) g_get_user_data_dir ();
for (datadir_i = 0; sdatadirs[datadir_i]; datadir_i++)
- datadirs[datadir_i + 1] = sdatadirs[datadir_i];
+ datadirs[datadir_i + 1] = (gchar *) sdatadirs[datadir_i];
searchi = 0;
searchmax = 10;
@@ -763,7 +763,7 @@ resolve_man_uri (YelpUri *uri)
if (section)
realsection = section;
else
- realsection = mancats[k];
+ realsection = (gchar *) mancats[k];
fullpath = g_strconcat (langdir, "/man", realsection,
"/", name, ".", realsection,
diff --git a/src/yelp-application.c b/src/yelp-application.c
index d6f81fb..98b636a 100644
--- a/src/yelp-application.c
+++ b/src/yelp-application.c
@@ -570,7 +570,6 @@ yelp_application_add_bookmark (YelpApplication *app,
const gchar *title)
{
GSettings *settings;
- YelpApplicationPrivate *priv = GET_PRIV (app);
settings = application_get_doc_settings (app, doc_uri);
@@ -638,7 +637,6 @@ window_resized (YelpWindow *window,
YelpApplication *app)
{
YelpApplicationPrivate *priv = GET_PRIV (app);
- gint width, height;
YelpUri *uri;
gchar *doc_uri;
GSettings *settings;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]