Revision: 2257 http://geany.svn.sourceforge.net/geany/?rev=2257&view=rev Author: eht16 Date: 2008-02-13 10:54:05 -0800 (Wed, 13 Feb 2008)
Log Message: ----------- Fix some compiler warnings.
Modified Paths: -------------- trunk/ChangeLog trunk/src/document.c trunk/src/encodings.c trunk/src/treeviews.c trunk/src/vte.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2008-02-13 16:08:47 UTC (rev 2256) +++ trunk/ChangeLog 2008-02-13 18:54:05 UTC (rev 2257) @@ -1,6 +1,8 @@ 2008-02-13 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
* src/keybindings.h: Fix broken compilation with GTK < 2.10. + * src/document.c, src/encodings.c, src/treeviews.c, src/vte.c: + Fix some compiler warnings.
2008-02-12 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/document.c =================================================================== --- trunk/src/document.c 2008-02-13 16:08:47 UTC (rev 2256) +++ trunk/src/document.c 2008-02-13 18:54:05 UTC (rev 2257) @@ -763,7 +763,7 @@
if (! g_file_get_contents(locale_filename, &filedata->data, NULL, &err)) { - ui_set_statusbar(TRUE, err->message); + ui_set_statusbar(TRUE, "%s", err->message); g_error_free(err); return FALSE; }
Modified: trunk/src/encodings.c =================================================================== --- trunk/src/encodings.c 2008-02-13 16:08:47 UTC (rev 2256) +++ trunk/src/encodings.c 2008-02-13 18:54:05 UTC (rev 2257) @@ -525,7 +525,7 @@ if (charset == NULL) continue;
- geany_debug("Trying to convert %d bytes of data from %s into UTF-8.", size, charset); + geany_debug("Trying to convert %d bytes of data from %s into UTF-8.", (gint) size, charset); utf8_content = encodings_convert_to_utf8_from_charset(buffer, size, charset, FALSE);
if (utf8_content != NULL)
Modified: trunk/src/treeviews.c =================================================================== --- trunk/src/treeviews.c 2008-02-13 16:08:47 UTC (rev 2256) +++ trunk/src/treeviews.c 2008-02-13 18:54:05 UTC (rev 2257) @@ -561,7 +561,7 @@
static gboolean change_focus(gpointer data) { - gint idx = (gint) data; + gint idx = GPOINTER_TO_INT(data);
// idx might not be valid e.g. if user closed a tab whilst Geany is opening files if (DOC_IDX_VALID(idx)) @@ -589,7 +589,7 @@ gtk_notebook_set_current_page(GTK_NOTEBOOK(app->notebook), gtk_notebook_page_num(GTK_NOTEBOOK(app->notebook), (GtkWidget*) doc_list[idx].sci)); - g_idle_add((GSourceFunc) change_focus, (gpointer) idx); + g_idle_add((GSourceFunc) change_focus, GINT_TO_POINTER(idx)); } }
Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2008-02-13 16:08:47 UTC (rev 2256) +++ trunk/src/vte.c 2008-02-13 18:54:05 UTC (rev 2257) @@ -32,6 +32,7 @@ #include <gdk/gdkkeysyms.h> #include <signal.h> #include <string.h> +#include <errno.h>
#include "vte.h" #include "msgwindow.h" @@ -557,7 +558,8 @@ { g_free(vte_info.dir); vte_info.dir = g_get_current_dir(); - chdir(cwd); + if (chdir(cwd) != 0) + geany_debug("%s: %s", __func__, g_strerror(errno)); } g_free(cwd); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.