adium 3060:da0720ca67a6: Cast gsc->fd to a intptr_t before casti...

commits at adium.im commits at adium.im
Tue Dec 22 22:13:56 UTC 2009


details:	http://hg.adium.im/adium/rev/da0720ca67a6
revision:	3060:da0720ca67a6
author:		Stephen Holt <sholt at adium.im>
date:		Tue Dec 22 17:13:52 2009 -0500

Cast gsc->fd to a intptr_t before casting to SSLConnectionRef (const void *).

This should be safe, as it's defined as an int and only int or gint (typedef int) values are stored in it.
Silences a warning.  Only #warning compiler directives are left.

diffs (12 lines):

diff -r 7e6ad9edf243 -r da0720ca67a6 Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c
--- a/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c	Tue Dec 22 16:21:10 2009 -0500
+++ b/Plugins/Purple Service/libpurple_extensions/ssl-cdsa.c	Tue Dec 22 17:13:52 2009 -0500
@@ -327,7 +327,7 @@
     /*
      * Pass the connection information to the connection to be used by our callbacks
      */
-    err = (OSStatus)SSLSetConnection(cdsa_data->ssl_ctx, (SSLConnectionRef)gsc->fd);
+    err = (OSStatus)SSLSetConnection(cdsa_data->ssl_ctx, (SSLConnectionRef)(intptr_t)gsc->fd);
     if (err != noErr) {
 		purple_debug_error("cdsa", "SSLSetConnection failed\n");
 		if (gsc->error_cb != NULL)




More information about the commits mailing list