[yelp] libyelp: Fix some uninitialized variables
- From: Yosef Or Boczko <yoseforb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [yelp] libyelp: Fix some uninitialized variables
- Date: Thu, 16 Jul 2015 11:18:57 +0000 (UTC)
commit 0efbf11ea9d9d66c27c15c0b8bea2a3606d682b6
Author: Yosef Or Boczko <yoseforb src gnome org>
Date: Thu Jul 16 14:17:52 2015 +0300
libyelp: Fix some uninitialized variables
This fix errors build with last gcc.
libyelp/yelp-mallard-document.c | 6 +++---
libyelp/yelp-view.c | 4 ++--
2 files changed, 5 insertions(+), 5 deletions(-)
---
diff --git a/libyelp/yelp-mallard-document.c b/libyelp/yelp-mallard-document.c
index 2ed94d8..e42f40b 100644
--- a/libyelp/yelp-mallard-document.c
+++ b/libyelp/yelp-mallard-document.c
@@ -324,8 +324,8 @@ mallard_think (YelpMallardDocument *mallard)
gchar **path;
gint path_i;
- GFile *gfile;
- GFileEnumerator *children;
+ GFile *gfile = NULL;
+ GFileEnumerator *children = NULL;
GFileInfo *pageinfo;
editor_mode = yelp_settings_get_editor_mode (yelp_settings_get_default ());
@@ -976,7 +976,7 @@ mallard_index_threaded (YelpMallardDocument *mallard)
xmlXPathContextPtr xpath = NULL;
xmlXPathObjectPtr obj;
MallardIndexData *index = NULL;
- xmlChar *id;
+ xmlChar *id = NULL;
YelpUri *uri;
gchar *title, *desc, *fulltext, *tmp, *full_uri;
diff --git a/libyelp/yelp-view.c b/libyelp/yelp-view.c
index 47c9126..6783575 100644
--- a/libyelp/yelp-view.c
+++ b/libyelp/yelp-view.c
@@ -1018,7 +1018,7 @@ view_install_uri (YelpView *view,
GtkWidget *gtkwin;
GdkWindow *gdkwin;
/* do not free */
- const gchar *pkg, *confirm_search;
+ const gchar *pkg = NULL, *confirm_search;
if (g_str_has_prefix (uri, "install-help:")) {
help = TRUE;
@@ -2058,7 +2058,7 @@ static gdouble
get_screen_dpi (GdkScreen *screen)
{
GtkSettings *settings = NULL;
- gdouble dpi;
+ gdouble dpi = -1;
gdouble dp, di;
settings = gtk_settings_get_for_screen (screen);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]