summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShaun McCance <shaunm@gnome.org>2010-05-06 23:20:45 -0500
committerShaun McCance <shaunm@gnome.org>2010-05-06 23:20:45 -0500
commitacd326ba53bff6d7523af15c762c60179ddfe814 (patch)
tree6feea8d0ab99b22e2cbf27767cf6d98422bd6c8f
parent5571538077e776c7634517b0815a532ed8ae1496 (diff)
downloadyelp-acd326ba53bff6d7523af15c762c60179ddfe814.tar.gz
Fixed some compiler warnings
-rw-r--r--libyelp/yelp-docbook-document.c4
-rw-r--r--libyelp/yelp-document.c4
-rw-r--r--libyelp/yelp-settings.c2
-rw-r--r--libyelp/yelp-simple-document.c2
-rw-r--r--libyelp/yelp-uri.c10
-rw-r--r--src/yelp-application.c2
6 files changed, 11 insertions, 13 deletions
diff --git a/libyelp/yelp-docbook-document.c b/libyelp/yelp-docbook-document.c
index a9c097cb..7463033a 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 fb5a3ac7..1ead2fa4 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 7f2139fc..0c8a386a 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 658df0cd..a566dca1 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 fa2497e3..ee17b75a 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 d6f81fb6..98b636af 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;