changeset 23964:1568dc7a14f8

Warnings cleanup from Lee Roach. Fixes #6242.
author Daniel Atallah <daniel.atallah@gmail.com>
date Sun, 31 Aug 2008 18:49:23 +0000
parents d1797f30960f
children 0b41ff5ebd96
files libpurple/dbus-maybe.h libpurple/plugins/log_reader.c libpurple/protocols/null/nullprpl.c libpurple/protocols/qq/send_file.c libpurple/win32/giowin32.c libpurple/win32/libc_interface.h libpurple/win32/libc_internal.h libpurple/win32/win32dep.h
diffstat 8 files changed, 18 insertions(+), 11 deletions(-) [+]
line wrap: on
line diff
--- a/libpurple/dbus-maybe.h	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/dbus-maybe.h	Sun Aug 31 18:49:23 2008 +0000
@@ -23,7 +23,10 @@
 
 #else  /* !HAVE_DBUS */
 
-#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) 
+#define PURPLE_DBUS_REGISTER_POINTER(ptr, type) { \
+    if (ptr) {} \
+}
+
 #define PURPLE_DBUS_UNREGISTER_POINTER(ptr)
 #define DBUS_EXPORT
 
--- a/libpurple/plugins/log_reader.c	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/plugins/log_reader.c	Sun Aug 31 18:49:23 2008 +0000
@@ -1749,7 +1749,7 @@
 	gboolean main_cycle = TRUE;
 	char *c;
 	char *start_log;
-	char *new_line;
+	char *new_line = NULL;
 	int offset = 0;
 	GError *error;
 
--- a/libpurple/protocols/null/nullprpl.c	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/protocols/null/nullprpl.c	Sun Aug 31 18:49:23 2008 +0000
@@ -1125,7 +1125,8 @@
   NULL,                                /* padding... */
   NULL,
   NULL,
-  NULL,
+	sizeof(PurplePluginProtocolInfo),    /* struct_size */
+  NULL
 };
 
 static void nullprpl_init(PurplePlugin *plugin)
--- a/libpurple/protocols/qq/send_file.c	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/protocols/qq/send_file.c	Sun Aug 31 18:49:23 2008 +0000
@@ -122,11 +122,11 @@
 		sin.sin_addr.s_addr = g_htonl(info->remote_real_ip);
 	}
 	purple_debug(PURPLE_DEBUG_INFO, "QQ", "sending to channel: %d.%d.%d.%d:%d\n",
-			sin.sin_addr.s_addr & 0xff,
-			(sin.sin_addr.s_addr >> 8) & 0xff,
-			(sin.sin_addr.s_addr >> 16) & 0xff,
-			sin.sin_addr.s_addr >> 24,
-			g_ntohs(sin.sin_port)
+			(int)sin.sin_addr.s_addr & 0xff,
+			(int)(sin.sin_addr.s_addr >> 8) & 0xff,
+			(int)(sin.sin_addr.s_addr >> 16) & 0xff,
+			(int)sin.sin_addr.s_addr >> 24,
+			(int)g_ntohs(sin.sin_port)
 		  );
 	return sendto(info->sender_fd, buf, len, 0, (struct sockaddr *) &sin, sizeof(sin));
 }
--- a/libpurple/win32/giowin32.c	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/win32/giowin32.c	Sun Aug 31 18:49:23 2008 +0000
@@ -52,6 +52,8 @@
 
 #define BUFFER_SIZE 4096
 
+GIOChannel *wpurple_g_io_channel_win32_new_socket (int socket);
+
 typedef enum {
   G_IO_WIN32_WINDOWS_MESSAGES,	/* Windows messages */
   G_IO_WIN32_FILE_DESC,		/* Unix-like file descriptors from
--- a/libpurple/win32/libc_interface.h	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/win32/libc_interface.h	Sun Aug 31 18:49:23 2008 +0000
@@ -156,9 +156,6 @@
 #define localtime_r( time, resultp ) \
 wpurple_localtime_r( time, resultp )
 
-/* helper for purple_utf8_strftime() by way of purple_internal_strftime() in src/util.c */
-const char *wpurple_get_timezone_abbreviation(const struct tm *tm);
-
 #ifdef __cplusplus
 }
 #endif /* __cplusplus */
--- a/libpurple/win32/libc_internal.h	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/win32/libc_internal.h	Sun Aug 31 18:49:23 2008 +0000
@@ -29,6 +29,9 @@
 extern "C" {
 #endif /* __cplusplus */
 
+/* helper for purple_utf8_strftime() by way of purple_internal_strftime() in src/util.c */
+const char *wpurple_get_timezone_abbreviation(const struct tm *tm);
+
 /* sys/socket.h */
 int wpurple_socket(int domain, int style, int protocol);
 int wpurple_connect(int socket, struct sockaddr *addr, u_long length);
--- a/libpurple/win32/win32dep.h	Sun Aug 31 17:54:21 2008 +0000
+++ b/libpurple/win32/win32dep.h	Sun Aug 31 18:49:23 2008 +0000
@@ -54,6 +54,7 @@
  **/
 /* Windows helper functions */
 FARPROC wpurple_find_and_loadproc(const char *dllname, const char *procedure);
+gboolean wpurple_read_reg_dword(HKEY rootkey, const char *subkey, const char *valname, LPDWORD result);
 char *wpurple_read_reg_string(HKEY rootkey, const char *subkey, const char *valname); /* needs to be g_free'd */
 gboolean wpurple_write_reg_string(HKEY rootkey, const char *subkey, const char *valname, const char *value);
 char *wpurple_escape_dirsep(const char *filename); /* needs to be g_free'd */