[PATCH] Lots of minor code tidyups.
- From: Rupert Swarbrick <rswarbrick gmail com>
- To: gnome-doc-devel-list gnome org
- Subject: [PATCH] Lots of minor code tidyups.
- Date: Wed, 22 Dec 2010 12:04:30 +0000
The problems fixed here were found by running with CFLAGS='-Wall' and
also using cppcheck.
---
libyelp/yelp-bookmarks.c | 2 +-
libyelp/yelp-bz2-decompressor.c | 1 -
libyelp/yelp-docbook-document.c | 6 +++-
libyelp/yelp-document.c | 13 ++++++----
libyelp/yelp-document.h | 2 +-
libyelp/yelp-help-list.c | 26 ++++++++++++++-------
libyelp/yelp-info-parser.c | 2 +-
libyelp/yelp-location-entry.c | 19 ++++++---------
libyelp/yelp-mallard-document.c | 47 ++++++++++++++++++++------------------
libyelp/yelp-man-document.c | 4 ++-
libyelp/yelp-settings.c | 7 +++--
libyelp/yelp-simple-document.c | 2 -
libyelp/yelp-transform.c | 4 ---
libyelp/yelp-view.c | 6 ++--
14 files changed, 75 insertions(+), 66 deletions(-)
diff --git a/libyelp/yelp-bookmarks.c b/libyelp/yelp-bookmarks.c
index 670650d..a8aeab1 100644
--- a/libyelp/yelp-bookmarks.c
+++ b/libyelp/yelp-bookmarks.c
@@ -83,7 +83,7 @@ yelp_bookmarks_is_bookmarked (YelpBookmarks *bookmarks,
{
YelpBookmarksInterface *iface;
- g_return_if_fail (YELP_IS_BOOKMARKS (bookmarks));
+ g_return_val_if_fail (YELP_IS_BOOKMARKS (bookmarks), FALSE);
iface = YELP_BOOKMARKS_GET_INTERFACE (bookmarks);
diff --git a/libyelp/yelp-bz2-decompressor.c b/libyelp/yelp-bz2-decompressor.c
index 98802ce..89dbe35 100644
--- a/libyelp/yelp-bz2-decompressor.c
+++ b/libyelp/yelp-bz2-decompressor.c
@@ -128,7 +128,6 @@ yelp_bz2_decompressor_convert (GConverter *converter,
GError **error)
{
YelpBz2Decompressor *decompressor;
- gsize header_size;
int res;
decompressor = YELP_BZ2_DECOMPRESSOR (converter);
diff --git a/libyelp/yelp-docbook-document.c b/libyelp/yelp-docbook-document.c
index b6a1d90..9863574 100644
--- a/libyelp/yelp-docbook-document.c
+++ b/libyelp/yelp-docbook-document.c
@@ -242,7 +242,7 @@ docbook_request_page (YelpDocument *document,
callback,
user_data);
if (handled) {
- return;
+ return TRUE;
}
g_mutex_lock (priv->mutex);
@@ -272,6 +272,8 @@ docbook_request_page (YelpDocument *document,
}
g_mutex_unlock (priv->mutex);
+
+ return FALSE;
}
/******************************************************************************/
@@ -356,7 +358,7 @@ docbook_process (YelpDocbookDocument *docbook)
id = xmlGetNsProp (priv->xmlcur, XML_XML_NAMESPACE, BAD_CAST "id");
if (id) {
- priv->root_id = g_strdup (id);
+ priv->root_id = g_strdup ((const gchar*)id);
yelp_document_set_page_id (document, NULL, (gchar *) id);
yelp_document_set_page_id (document, "//index", (gchar *) id);
yelp_document_set_prev_id (document, (gchar *) id, "//about");
diff --git a/libyelp/yelp-document.c b/libyelp/yelp-document.c
index 215586e..0ca6b24 100644
--- a/libyelp/yelp-document.c
+++ b/libyelp/yelp-document.c
@@ -205,6 +205,7 @@ yelp_document_get_for_uri (YelpUri *uri)
case YELP_URI_DOCUMENT_TYPE_NOT_FOUND:
case YELP_URI_DOCUMENT_TYPE_EXTERNAL:
case YELP_URI_DOCUMENT_TYPE_ERROR:
+ case YELP_URI_DOCUMENT_TYPE_UNRESOLVED:
break;
}
@@ -625,7 +626,7 @@ yelp_document_get_page_icon (YelpDocument *document,
return ret;
}
-gchar *
+void
yelp_document_set_page_icon (YelpDocument *document,
const gchar *page_id,
const gchar *icon)
@@ -646,8 +647,9 @@ yelp_document_request_page (YelpDocument *document,
YelpDocumentCallback callback,
gpointer user_data)
{
- g_return_if_fail (YELP_IS_DOCUMENT (document));
- g_return_if_fail (YELP_DOCUMENT_GET_CLASS (document)->request_page != NULL);
+ g_return_val_if_fail (YELP_IS_DOCUMENT (document), FALSE);
+ g_return_val_if_fail (YELP_DOCUMENT_GET_CLASS (document)->request_page != NULL,
+ FALSE);
debug_print (DB_FUNCTION, "entering\n");
@@ -786,8 +788,9 @@ gchar *
yelp_document_get_mime_type (YelpDocument *document,
const gchar *page_id)
{
- g_return_if_fail (YELP_IS_DOCUMENT (document));
- g_return_if_fail (YELP_DOCUMENT_GET_CLASS (document)->get_mime_type != NULL);
+ g_return_val_if_fail (YELP_IS_DOCUMENT (document), NULL);
+ g_return_val_if_fail (YELP_DOCUMENT_GET_CLASS (document)->get_mime_type != NULL,
+ NULL);
return YELP_DOCUMENT_GET_CLASS (document)->get_mime_type (document, page_id);
}
diff --git a/libyelp/yelp-document.h b/libyelp/yelp-document.h
index d9f30af..15ae8dc 100644
--- a/libyelp/yelp-document.h
+++ b/libyelp/yelp-document.h
@@ -145,7 +145,7 @@ void yelp_document_set_page_desc (YelpDocument *document,
gchar * yelp_document_get_page_icon (YelpDocument *document,
const gchar *page_id);
-gchar * yelp_document_set_page_icon (YelpDocument *document,
+void yelp_document_set_page_icon (YelpDocument *document,
const gchar *page_id,
const gchar *icon);
diff --git a/libyelp/yelp-help-list.c b/libyelp/yelp-help-list.c
index 7b17798..f5b76ab 100644
--- a/libyelp/yelp-help-list.c
+++ b/libyelp/yelp-help-list.c
@@ -31,6 +31,7 @@
#include <libxml/parser.h>
#include <libxml/xinclude.h>
#include <libxml/xpath.h>
+#include <libxml/xpathInternals.h>
#include "yelp-help-list.h"
#include "yelp-settings.h"
@@ -131,15 +132,22 @@ yelp_help_list_init (YelpHelpList *list)
g_free,
(GDestroyNotify) help_list_entry_free);
- priv->get_docbook_title = xmlXPathCompile ("normalize-space("
+ priv->get_docbook_title = xmlXPathCompile (BAD_CAST
+ "normalize-space("
"( /*/title | /*/db:title"
"| /*/articleinfo/title"
"| /*/bookinfo/title"
"| /*/db:info/db:title"
")[1])");
- priv->get_mallard_title = xmlXPathCompile ("normalize-space((/mal:page/mal:info/mal:title[ type='text'] |"
- " /mal:page/mal:title)[1])");
- priv->get_mallard_desc = xmlXPathCompile ("normalize-space(/mal:page/mal:info/mal:desc[1])");
+
+ priv->get_mallard_title = xmlXPathCompile (
+ BAD_CAST
+ "normalize-space((/mal:page/mal:info/mal:title[ type='text'] |"
+ " /mal:page/mal:title)[1])");
+
+ priv->get_mallard_desc = xmlXPathCompile (
+ BAD_CAST
+ "normalize-space(/mal:page/mal:info/mal:desc[1])");
yelp_document_set_page_id ((YelpDocument *) list, NULL, "index");
yelp_document_set_page_id ((YelpDocument *) list, "index", "index");
@@ -225,7 +233,7 @@ help_list_think (YelpHelpList *list)
YelpHelpListPrivate *priv = GET_PRIV (list);
/* The strings are still owned by GLib; we just own the array. */
gchar **datadirs;
- gint datadir_i, subdir_i, lang_i;
+ gint datadir_i, lang_i;
GList *cur;
GtkIconTheme *theme;
@@ -248,7 +256,7 @@ help_list_think (YelpHelpList *list)
g_free (helpdirname);
continue;
}
- while (child = g_file_enumerator_next_file (children, NULL, NULL)) {
+ while ((child = g_file_enumerator_next_file (children, NULL, NULL))) {
gchar *docid;
HelpListEntry *entry = NULL;
@@ -561,7 +569,7 @@ help_list_process_docbook (YelpHelpList *list,
obj = xmlXPathCompiledEval (priv->get_docbook_title, xpath);
if (obj) {
if (obj->stringval)
- entry->title = g_strdup (obj->stringval);
+ entry->title = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
}
@@ -601,14 +609,14 @@ help_list_process_mallard (YelpHelpList *list,
obj = xmlXPathCompiledEval (priv->get_mallard_title, xpath);
if (obj) {
if (obj->stringval)
- entry->title = g_strdup (obj->stringval);
+ entry->title = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
}
obj = xmlXPathCompiledEval (priv->get_mallard_desc, xpath);
if (obj) {
if (obj->stringval)
- entry->desc = g_strdup (obj->stringval);
+ entry->desc = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
}
diff --git a/libyelp/yelp-info-parser.c b/libyelp/yelp-info-parser.c
index edd3812..3cc0443 100644
--- a/libyelp/yelp-info-parser.c
+++ b/libyelp/yelp-info-parser.c
@@ -1349,7 +1349,7 @@ info_process_text_notes (xmlNodePtr *node, gchar *content, GtkTreeStore *tree)
notes = g_regex_split_simple ("\\*[Nn]ote(?!_)", content, 0, 0);
for (current = notes; *current != NULL; current++) {
- gchar *url, **urls, **ulink;
+ gchar *url, **urls;
gchar *append;
gchar *alt_append, *alt_append1;
gchar *link_text;
diff --git a/libyelp/yelp-location-entry.c b/libyelp/yelp-location-entry.c
index defe05b..897e8e2 100644
--- a/libyelp/yelp-location-entry.c
+++ b/libyelp/yelp-location-entry.c
@@ -879,7 +879,6 @@ combo_box_row_separator_func (GtkTreeModel *model,
GtkTreeIter *iter,
gpointer user_data)
{
- YelpLocationEntryPrivate *priv = GET_PRIV (user_data);
gint flags;
gtk_tree_model_get (model, iter,
HISTORY_COL_FLAGS, &flags,
@@ -905,7 +904,6 @@ entry_focus_in_cb (GtkWidget *widget,
GdkEventFocus *event,
gpointer user_data)
{
- GtkEntry *text_entry = GTK_ENTRY (widget);
YelpLocationEntryPrivate *priv = GET_PRIV (user_data);
if (priv->enable_search && !priv->search_mode)
@@ -934,13 +932,17 @@ entry_activate_cb (GtkEntry *text_entry,
gpointer user_data)
{
YelpLocationEntryPrivate *priv = GET_PRIV (user_data);
- gchar *text = g_strdup (gtk_entry_get_text (text_entry));
+ gchar *text;
if (!priv->enable_search)
return;
- if (!priv->search_mode || text == NULL || strlen(text) == 0)
+ text = g_strdup (gtk_entry_get_text (text_entry));
+
+ if (!priv->search_mode || text == NULL || strlen(text) == 0) {
+ g_free (text);
return;
+ }
g_signal_emit (user_data, location_entry_signals[SEARCH_ACTIVATED], 0, text);
@@ -953,8 +955,6 @@ entry_icon_press_cb (GtkEntry *gtkentry,
GdkEvent *event,
YelpLocationEntry *entry)
{
- YelpLocationEntryPrivate *priv = GET_PRIV (entry);
-
if (icon_pos == GTK_ENTRY_ICON_SECONDARY) {
const gchar *name = gtk_entry_get_icon_name (gtkentry, icon_pos);
if (g_str_equal (name, "edit-clear")) {
@@ -991,7 +991,6 @@ cell_set_text_cell (GtkCellLayout *layout,
YelpLocationEntry *entry)
{
gchar *title, *desc, *color, *text;
- YelpLocationEntryPrivate *priv = GET_PRIV (entry);
gtk_tree_model_get (model, iter,
HISTORY_COL_TITLE, &title,
@@ -1083,7 +1082,6 @@ cell_set_completion_text_cell (GtkCellLayout *layout,
YelpLocationEntry *entry)
{
gchar *title, *desc, *color, *text;
- YelpLocationEntryPrivate *priv = GET_PRIV (entry);
gtk_tree_model_get (model, iter,
COMPLETION_COL_TITLE, &title,
@@ -1117,7 +1115,6 @@ entry_match_func (GtkEntryCompletion *completion,
gboolean ret = FALSE;
gchar **strs;
GtkTreeModel *model = gtk_entry_completion_get_model (completion);
- YelpLocationEntryPrivate *priv = GET_PRIV (entry);
gtk_tree_model_get (model, iter,
HISTORY_COL_TITLE, &title,
@@ -1297,7 +1294,7 @@ view_uri_selected (YelpView *view,
gchar *iter_uri;
gboolean cont;
YelpUri *uri;
- gchar *struri, *doc_uri;
+ gchar *struri;
YelpLocationEntryPrivate *priv = GET_PRIV (entry);
g_object_get (G_OBJECT (view), "yelp-uri", &uri, NULL);
@@ -1437,7 +1434,7 @@ bookmarks_changed (YelpBookmarks *bookmarks,
const gchar *doc_uri,
YelpLocationEntry *entry)
{
- GtkTreePath *path;
+ GtkTreePath *path = NULL;
YelpLocationEntryPrivate *priv = GET_PRIV (entry);
if (priv->row)
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
index 1bab124..f67bb97 100644
--- a/libyelp/yelp-mallard-document.c
+++ b/libyelp/yelp-mallard-document.c
@@ -162,7 +162,7 @@ yelp_mallard_document_init (YelpMallardDocument *mallard)
priv->pages_hash = g_hash_table_new_full (g_str_hash, g_str_equal,
NULL,
(GDestroyNotify) mallard_page_data_free);
- priv->normalize = xmlXPathCompile ("normalize-space(.)");
+ priv->normalize = xmlXPathCompile (BAD_CAST "normalize-space(.)");
}
static void
@@ -278,7 +278,6 @@ mallard_think (YelpMallardDocument *mallard)
{
YelpMallardDocumentPrivate *priv = GET_PRIV (mallard);
GError *error = NULL;
- YelpDocument *document;
gchar **search_path;
gboolean editor_mode;
@@ -300,7 +299,7 @@ mallard_think (YelpMallardDocument *mallard)
error = g_error_new (YELP_ERROR, YELP_ERROR_NOT_FOUND,
_("The directory â??%sâ?? does not exist."),
search_path[0]);
- yelp_document_error_pending ((YelpDocument *) document, error);
+ yelp_document_error_pending ((YelpDocument *) mallard, error);
g_error_free (error);
goto done;
}
@@ -473,7 +472,8 @@ mallard_page_data_walk (MallardPageData *page_data)
if (id == NULL)
goto done;
- ispage = xml_node_is_ns_name (page_data->cur, MALLARD_NS, BAD_CAST "page");
+ ispage = xml_node_is_ns_name (page_data->cur,
+ BAD_CAST MALLARD_NS, BAD_CAST "page");
if (ispage && g_hash_table_lookup (priv->pages_hash, id) != NULL)
goto done;
@@ -494,7 +494,7 @@ mallard_page_data_walk (MallardPageData *page_data)
style = xmlGetProp (page_data->cur, BAD_CAST "style");
if (style) {
gint i;
- styles = g_strsplit (style, " ", -1);
+ styles = g_strsplit ((const gchar*) style, " ", -1);
for (i = 0; styles[i] != NULL; i++) {
if (g_str_equal (styles[i], "task")) {
icon = "yelp-page-task";
@@ -531,10 +531,12 @@ mallard_page_data_walk (MallardPageData *page_data)
for (child = page_data->cur->children; child; child = child->next) {
if (child->type != XML_ELEMENT_NODE)
continue;
- if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "info")) {
+ if (xml_node_is_ns_name (child,
+ BAD_CAST MALLARD_NS, BAD_CAST "info")) {
mallard_page_data_info (page_data, child, info);
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "title")) {
+ else if (xml_node_is_ns_name (child,
+ BAD_CAST MALLARD_NS, BAD_CAST "title")) {
xmlNodePtr node;
xmlNodePtr title_node = xmlNewChild (page_data->cache,
priv->cache_ns,
@@ -565,11 +567,12 @@ mallard_page_data_walk (MallardPageData *page_data)
xmlXPathObjectPtr obj;
page_data->xpath->node = child;
obj = xmlXPathCompiledEval (priv->normalize, page_data->xpath);
- page_data->page_title = g_strdup (obj->stringval);
+ page_data->page_title = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
}
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "section")) {
+ else if (xml_node_is_ns_name (child,
+ BAD_CAST MALLARD_NS, BAD_CAST "section")) {
oldcur = page_data->cur;
oldcache = page_data->cache;
page_data->cur = child;
@@ -593,14 +596,15 @@ mallard_page_data_info (MallardPageData *page_data,
xmlNodePtr cache_node)
{
xmlNodePtr child;
- gboolean editor_mode = yelp_settings_get_editor_mode (yelp_settings_get_default ());
for (child = info_node->children; child; child = child->next) {
- if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "info")) {
+ if (xml_node_is_ns_name (child,
+ BAD_CAST MALLARD_NS, BAD_CAST "info")) {
mallard_page_data_info (page_data, child, cache_node);
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "title")) {
- xmlNodePtr node, title_node;
+ else if (xml_node_is_ns_name (child,
+ BAD_CAST MALLARD_NS, BAD_CAST "title")) {
+ xmlNodePtr title_node;
xmlChar *type, *role;
title_node = xmlCopyNode (child, 1);
xmlAddChild (cache_node, title_node);
@@ -618,29 +622,29 @@ mallard_page_data_info (MallardPageData *page_data,
page_data->xpath->node = child;
obj = xmlXPathCompiledEval (priv->normalize, page_data->xpath);
g_free (page_data->page_title);
- page_data->page_title = g_strdup (obj->stringval);
+ page_data->page_title = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
}
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "desc")) {
+ else if (xml_node_is_ns_name (child, BAD_CAST MALLARD_NS, BAD_CAST "desc")) {
YelpMallardDocumentPrivate *priv = GET_PRIV (page_data->mallard);
xmlXPathObjectPtr obj;
page_data->xpath->node = child;
obj = xmlXPathCompiledEval (priv->normalize, page_data->xpath);
- page_data->page_desc = g_strdup (obj->stringval);
+ page_data->page_desc = g_strdup ((const gchar*) obj->stringval);
xmlXPathFreeObject (obj);
xmlAddChild (cache_node, xmlCopyNode (child, 1));
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "link")) {
+ else if (xml_node_is_ns_name (child, BAD_CAST MALLARD_NS, BAD_CAST "link")) {
xmlAddChild (cache_node, xmlCopyNode (child, 1));
}
- else if (xml_node_is_ns_name (child, MALLARD_NS, BAD_CAST "revision")) {
+ else if (xml_node_is_ns_name (child, BAD_CAST MALLARD_NS, BAD_CAST "revision")) {
xmlAddChild (cache_node, xmlCopyNode (child, 1));
}
- else if (xml_node_is_ns_name (child, MALLARD_FACET_NS, BAD_CAST "tag") ||
- xml_node_is_ns_name (child, MALLARD_FACET_NS, BAD_CAST "match") ||
- xml_node_is_ns_name (child, MALLARD_FACET_NS, BAD_CAST "choice") ) {
+ else if (xml_node_is_ns_name (child, BAD_CAST MALLARD_FACET_NS, BAD_CAST "tag") ||
+ xml_node_is_ns_name (child, BAD_CAST MALLARD_FACET_NS, BAD_CAST "match") ||
+ xml_node_is_ns_name (child, BAD_CAST MALLARD_FACET_NS, BAD_CAST "choice") ) {
xmlAddChild (cache_node, xmlCopyNode (child, 1));
}
}
@@ -651,7 +655,6 @@ mallard_page_data_run (MallardPageData *page_data)
{
YelpSettings *settings = yelp_settings_get_default ();
YelpMallardDocumentPrivate *priv = GET_PRIV (page_data->mallard);
- gint i, ix;
gchar **params = NULL;
mallard_page_data_cancel (page_data);
diff --git a/libyelp/yelp-man-document.c b/libyelp/yelp-man-document.c
index 4fac05a..f401044 100644
--- a/libyelp/yelp-man-document.c
+++ b/libyelp/yelp-man-document.c
@@ -244,7 +244,7 @@ man_request_page (YelpDocument *document,
callback,
user_data);
if (handled) {
- return;
+ return TRUE;
}
g_mutex_lock (priv->mutex);
@@ -277,6 +277,8 @@ man_request_page (YelpDocument *document,
}
g_mutex_unlock (priv->mutex);
+
+ return FALSE;
}
diff --git a/libyelp/yelp-settings.c b/libyelp/yelp-settings.c
index b1f2f90..532bca1 100644
--- a/libyelp/yelp-settings.c
+++ b/libyelp/yelp-settings.c
@@ -237,8 +237,6 @@ yelp_settings_init (YelpSettings *settings)
static void
yelp_settings_dispose (GObject *object)
{
- YelpSettings *settings = YELP_SETTINGS (object);
-
G_OBJECT_CLASS (yelp_settings_parent_class)->dispose (object);
}
@@ -525,6 +523,8 @@ yelp_settings_get_font_family (YelpSettings *settings,
done:
g_mutex_unlock (settings->priv->mutex);
+ g_free (desc);
+
return ret;
}
@@ -561,6 +561,8 @@ yelp_settings_get_font_size (YelpSettings *settings,
g_mutex_unlock (settings->priv->mutex);
ret += settings->priv->font_adjustment;
ret = (ret < 5) ? 5 : ret;
+ g_free (desc);
+
return ret;
}
@@ -759,7 +761,6 @@ gtk_theme_changed (GtkSettings *gtk_settings,
GdkColor blue = { 0, 0x1E1E, 0x3E3E, 0xE7E7 };
gdouble base_h, base_s, base_v;
gdouble text_h, text_s, text_v;
- gint i;
g_mutex_lock (settings->priv->mutex);
diff --git a/libyelp/yelp-simple-document.c b/libyelp/yelp-simple-document.c
index de62a9b..aa466d5 100644
--- a/libyelp/yelp-simple-document.c
+++ b/libyelp/yelp-simple-document.c
@@ -390,8 +390,6 @@ stream_close_cb (GInputStream *stream,
GAsyncResult *result,
YelpSimpleDocument *document)
{
- GSList *cur;
-
document->priv->finished = TRUE;
document_signal_all (document);
}
diff --git a/libyelp/yelp-transform.c b/libyelp/yelp-transform.c
index eecfe6a..b9853b4 100644
--- a/libyelp/yelp-transform.c
+++ b/libyelp/yelp-transform.c
@@ -60,9 +60,6 @@ static void yelp_transform_set_property (GObject *object,
GParamSpec *pspec);
static void transform_run (YelpTransform *transform);
-static gboolean transform_free (YelpTransform *transform);
-static void transform_set_error (YelpTransform *transform,
- YelpError *error);
static gboolean transform_chunk (YelpTransform *transform);
static gboolean transform_error (YelpTransform *transform);
@@ -224,7 +221,6 @@ static void
yelp_transform_finalize (GObject *object)
{
YelpTransformPrivate *priv = GET_PRIV (object);
- xsltDocumentPtr xsltdoc;
GHashTableIter iter;
gpointer chunk;
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index c2b80eb..b8732db 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -175,6 +175,7 @@ struct _YelpActionEntry {
YelpViewActionValidFunc func;
gpointer data;
};
+static void
action_entry_free (YelpActionEntry *entry)
{
if (entry == NULL)
@@ -695,7 +696,7 @@ view_scrolled (GtkAdjustment *adjustment,
return;
if (adjustment == priv->vadjustment)
((YelpBackEntry *) priv->back_cur->data)->vadj = gtk_adjustment_get_value (adjustment);
- else if (adjustment = priv->hadjustment)
+ else if (adjustment == priv->hadjustment)
((YelpBackEntry *) priv->back_cur->data)->hadj = gtk_adjustment_get_value (adjustment);
}
@@ -1233,7 +1234,6 @@ view_resource_request (WebKitWebView *view,
{
YelpViewPrivate *priv = GET_PRIV (view);
const gchar *requri = webkit_network_request_get_uri (request);
- gchar last;
gchar *newpath;
if (!g_str_has_prefix (requri, BOGUS_URI))
@@ -1536,7 +1536,7 @@ uri_resolved (YelpUri *uri,
}
else {
error = g_error_new (YELP_ERROR, YELP_ERROR_NOT_FOUND,
- _("The URI does not point to a valid page."),
+ _("The URI '%s' does not point to a valid page."),
struri);
}
view_show_error_page (view, error);
--
1.7.2.3
[
Date Prev][Date Next] [
Thread Prev][Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]