summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorBerke Viktor <bviktor@hexchat.org>2012-10-30 21:25:58 +0100
committerBerke Viktor <bviktor@hexchat.org>2012-10-30 21:25:58 +0100
commitcb0f6c8c91b564e541688b3f0f57d8456295dc1f (patch)
tree0ac1427e1d3a18ae152bd1d34f424c6db7759479
parent284dbfbe3dc37e94b57e110b6ea23f847b9f6035 (diff)
Eliminate some more warnings
-rw-r--r--src/common/cfgfiles.c2
-rw-r--r--src/common/cfgfiles.h2
-rw-r--r--src/common/hexchat.c2
-rw-r--r--src/common/server.c2
-rw-r--r--src/common/ssl.c2
-rw-r--r--src/common/url.c2
-rw-r--r--src/common/url.h2
-rw-r--r--src/fe-gtk/gtkutil.c2
-rw-r--r--src/fe-gtk/maingui.c2
-rw-r--r--src/fe-gtk/plugin-tray.c2
-rw-r--r--src/fe-gtk/xtext.c4
11 files changed, 12 insertions, 12 deletions
diff --git a/src/common/cfgfiles.c b/src/common/cfgfiles.c
index a8865cf9..7e2cd653 100644
--- a/src/common/cfgfiles.c
+++ b/src/common/cfgfiles.c
@@ -166,7 +166,7 @@ list_delentry (GSList ** list, char *name)
 }
 
 char *
-cfg_get_str (char *cfg, char *var, char *dest, int dest_len)
+cfg_get_str (char *cfg, const char *var, char *dest, int dest_len)
 {
 	char buffer[128];	/* should be plenty for a variable name */
 
diff --git a/src/common/cfgfiles.h b/src/common/cfgfiles.h
index d0062304..d32dbb67 100644
--- a/src/common/cfgfiles.h
+++ b/src/common/cfgfiles.h
@@ -8,7 +8,7 @@
 extern char *xdir_fs;
 extern char *xdir_utf;
 
-char *cfg_get_str (char *cfg, char *var, char *dest, int dest_len);
+char *cfg_get_str (char *cfg, const char *var, char *dest, int dest_len);
 int cfg_get_bool (char *var);
 int cfg_get_int_with_result (char *cfg, char *var, int *result);
 int cfg_get_int (char *cfg, char *var);
diff --git a/src/common/hexchat.c b/src/common/hexchat.c
index 739ae0c3..d8207fb0 100644
--- a/src/common/hexchat.c
+++ b/src/common/hexchat.c
@@ -1147,7 +1147,7 @@ main (int argc, char *argv[])
 			if (hextray_mode ())
 			{
 				/* FindWindow() doesn't support wildcards so we check all the open windows */
-				EnumWindows (enum_windows_impl, NULL);
+				EnumWindows (enum_windows_impl, (LPARAM) NULL);
 				return 0;
 			}
 			else
diff --git a/src/common/server.c b/src/common/server.c
index c3abb6ad..29ffbd3a 100644
--- a/src/common/server.c
+++ b/src/common/server.c
@@ -1053,7 +1053,7 @@ server_read_child (GIOChannel *source, GIOCondition condition, server *serv)
 static int
 server_cleanup (server * serv)
 {
-	fe_set_lag (serv, 0.0);
+	fe_set_lag (serv, 0);
 
 	if (serv->iotag)
 	{
diff --git a/src/common/ssl.c b/src/common/ssl.c
index 1ee42a08..830b3d83 100644
--- a/src/common/ssl.c
+++ b/src/common/ssl.c
@@ -206,7 +206,7 @@ _SSL_get_cert_info (struct cert_info *cert_info, SSL * ssl)
 struct chiper_info *
 _SSL_get_cipher_info (SSL * ssl)
 {
-	SSL_CIPHER *c;
+	const SSL_CIPHER *c;
 
 
 	c = SSL_get_current_cipher (ssl);
diff --git a/src/common/url.c b/src/common/url.c
index 618a4a71..0a4c3609 100644
--- a/src/common/url.c
+++ b/src/common/url.c
@@ -178,7 +178,7 @@ url_add (char *urltext, int len)
    2.4.4 release. */
 
 int
-url_check_word (char *word, int len)
+url_check_word (const char *word, int len)
 {
 #define D(x) (x), ((sizeof (x)) - 1)
 	static const struct {
diff --git a/src/common/url.h b/src/common/url.h
index dc5a65f8..9a815fe1 100644
--- a/src/common/url.h
+++ b/src/common/url.h
@@ -14,7 +14,7 @@ extern void *url_tree;
 
 void url_clear (void);
 void url_save_tree (const char *fname, const char *mode, gboolean fullpath);
-int url_check_word (char *word, int len);
+int url_check_word (const char *word, int len);
 void url_check_line (char *buf, int len);
 
 #endif
diff --git a/src/fe-gtk/gtkutil.c b/src/fe-gtk/gtkutil.c
index adaa48db..46958cf9 100644
--- a/src/fe-gtk/gtkutil.c
+++ b/src/fe-gtk/gtkutil.c
@@ -573,7 +573,7 @@ fe_get_str (char *msg, char *def, void *callback, void *userdata)
 										NULL);
 	gtk_box_set_homogeneous (GTK_BOX (GTK_DIALOG (dialog)->vbox), TRUE);
 
-	if ((int*) userdata == 1)	/* nick box is usually on the very bottom, make it centered */
+	if ((int) userdata == 1)	/* nick box is usually on the very bottom, make it centered */
 	{
 		gtk_window_set_position (GTK_WINDOW (dialog), GTK_WIN_POS_CENTER);
 	}
diff --git a/src/fe-gtk/maingui.c b/src/fe-gtk/maingui.c
index 9ae3a47f..1868512b 100644
--- a/src/fe-gtk/maingui.c
+++ b/src/fe-gtk/maingui.c
@@ -2641,7 +2641,7 @@ static void
 mg_nickclick_cb (GtkWidget *button, gpointer userdata)
 {
 	fe_get_str (_("Enter new nickname:"), current_sess->server->nick,
-					mg_change_nick, 1);
+					mg_change_nick, (void *) 1);
 }
 
 /* make sure chanview and userlist positions are sane */
diff --git a/src/fe-gtk/plugin-tray.c b/src/fe-gtk/plugin-tray.c
index 09e6fdb1..b9113804 100644
--- a/src/fe-gtk/plugin-tray.c
+++ b/src/fe-gtk/plugin-tray.c
@@ -376,7 +376,7 @@ tray_toggle_visibility (gboolean force_hide)
 	/* ph may have an invalid context now */
 	hexchat_set_context (ph, hexchat_find_context (ph, NULL, NULL));
 
-	win = hexchat_get_info (ph, "gtkwin_ptr");
+	win = GTK_WINDOW (hexchat_get_info (ph, "gtkwin_ptr"));
 
 	tray_stop_flash ();
 	tray_reset_counts ();
diff --git a/src/fe-gtk/xtext.c b/src/fe-gtk/xtext.c
index 18b6014b..7269e921 100644
--- a/src/fe-gtk/xtext.c
+++ b/src/fe-gtk/xtext.c
@@ -2179,7 +2179,7 @@ gtk_xtext_set_clip_owner (GtkWidget * xtext, GdkEventButton * event)
 void
 gtk_xtext_copy_selection (GtkXText *xtext)
 {
-	gtk_xtext_set_clip_owner (xtext, NULL);
+	gtk_xtext_set_clip_owner (GTK_WIDGET (xtext), NULL);
 }
 
 static void
@@ -4057,7 +4057,7 @@ gtk_xtext_load_trans (GtkXText * xtext)
 	ReleaseDC (hwnd, hdc);
 
 	gdk_drawable_get_size (GTK_WIDGET (xtext)->window, &width, &height);
-	img = gdk_image_get (GTK_WIDGET (xtext)->window, 0, 0, width+128, height);
+	img = gdk_drawable_get_image (GTK_WIDGET (xtext)->window, 0, 0, width+128, height);
 	xtext->pixmap = win32_tint (xtext, img, img->width, img->height);
 
 #else