Permalink
Browse files

Addons: fix a few pedantic warnings

  • Loading branch information...
1 parent e148e7a commit 372496417e30ea138cc6b08bbeb2638dba126b7f @b4n b4n committed Aug 27, 2011
@@ -31,7 +31,7 @@ static void editor_strip_trailing_newlines(GeanyEditor *editor)
const gint maxline = sci_get_line_count(editor->sci) - 1;
const gint maxpos = sci_get_line_end_position(editor->sci, maxline);
- gint line, start, end, pos;
+ gint line, start, end, pos = 0;
gchar ch;
/*
@@ -79,7 +79,7 @@ static void ao_bookmark_list_finalize (GObject *object);
static void ao_bookmark_list_show (AoBookmarkList *bm);
static void ao_bookmark_list_hide (AoBookmarkList *bm);
-G_DEFINE_TYPE(AoBookmarkList, ao_bookmark_list, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoBookmarkList, ao_bookmark_list, G_TYPE_OBJECT)
static void ao_bookmark_list_set_property(GObject *object, guint prop_id,
View
@@ -68,7 +68,7 @@ static void ao_doc_list_finalize (GObject *object);
static void ao_doclist_set_property(GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
-G_DEFINE_TYPE(AoDocList, ao_doc_list, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoDocList, ao_doc_list, G_TYPE_OBJECT)
static void ao_doc_list_class_init(AoDocListClass *klass)
View
@@ -59,7 +59,7 @@ enum
static void ao_mark_word_finalize (GObject *object);
-G_DEFINE_TYPE(AoMarkWord, ao_mark_word, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoMarkWord, ao_mark_word, G_TYPE_OBJECT)
static void ao_mark_word_set_property(GObject *object, guint prop_id,
View
@@ -66,7 +66,7 @@ static void ao_open_uri_set_property (GObject *object, guint prop_id,
const GValue *value, GParamSpec *pspec);
-G_DEFINE_TYPE(AoOpenUri, ao_open_uri, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoOpenUri, ao_open_uri, G_TYPE_OBJECT)
@@ -243,7 +243,7 @@ void ao_open_uri_update_menu(AoOpenUri *openuri, GeanyDocument *doc, gint pos)
if (sci_has_selection(doc->editor->sci))
{
gint len = sci_get_selected_text_length(doc->editor->sci);
- text = g_malloc0(len + 1);
+ text = g_malloc0((guint)len + 1);
sci_get_selected_text(doc->editor->sci, text);
}
else
@@ -252,7 +252,7 @@ void ao_open_uri_update_menu(AoOpenUri *openuri, GeanyDocument *doc, gint pos)
/* TODO be more restrictive when handling selections as there are too many hits by now */
if (text != NULL && (ao_uri_has_scheme(text) || ao_uri_is_link(text)))
{
- guint len = strlen(text);
+ gsize len = strlen(text);
/* remove trailing dots and colons */
if (text[len - 1] == '.' || text[len - 1] == ':')
text[len - 1] = '\0';
View
@@ -63,7 +63,7 @@ enum
WIDGET_PREFERENCES
};
-G_DEFINE_TYPE(AoSystray, ao_systray, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoSystray, ao_systray, G_TYPE_OBJECT)
static void ao_systray_finalize(GObject *object)
@@ -134,7 +134,7 @@ static void icon_activate_cb(GtkStatusIcon *status_icon, gpointer data)
static void icon_popup_menu_cmd_clicked_cb(GtkMenuItem *item, gpointer data)
{
GtkWidget *widget;
- const gchar *widget_name;
+ const gchar *widget_name = NULL;
switch (GPOINTER_TO_INT(data))
{
View
@@ -93,7 +93,7 @@ static void ao_tasks_finalize (GObject *object);
static void ao_tasks_show (AoTasks *t);
static void ao_tasks_hide (AoTasks *t);
-G_DEFINE_TYPE(AoTasks, ao_tasks, G_TYPE_OBJECT);
+G_DEFINE_TYPE(AoTasks, ao_tasks, G_TYPE_OBJECT)
static void ao_tasks_set_property(GObject *object, guint prop_id,
@@ -551,7 +551,7 @@ static void create_task(AoTasks *t, GeanyDocument *doc, gint line, const gchar *
static void update_tasks_for_doc(AoTasks *t, GeanyDocument *doc)
{
- guint lines, line;
+ gint lines, line;
gchar *line_buf, *display_name, *task_start;
gchar **token;
AoTasksPrivate *priv = AO_TASKS_GET_PRIVATE(t);
@@ -611,7 +611,7 @@ static gboolean ao_tasks_select_task(GtkTreeModel *model, GtkTreePath *path,
AoTasksPrivate *priv = AO_TASKS_GET_PRIVATE(data);
gint line, selected_line;
gchar *filename = NULL;
- gchar *selected_filename = NULL;
+ const gchar *selected_filename = NULL;
gboolean ret = FALSE;
if (priv->scan_all_documents)
@@ -88,7 +88,7 @@ void ao_xmltagging(void)
tag = g_strdup(gtk_entry_get_text(GTK_ENTRY(textbox)));
if (NZV(tag))
{
- gint end = 0;
+ gsize end = 0;
GString *tmp = NULL;
const gchar *end_tag;

0 comments on commit 3724964

Please sign in to comment.