summaryrefslogtreecommitdiff
path: root/lib/c_glib
diff options
context:
space:
mode:
authorzeshuai007 <51382517@qq.com>2020-03-21 10:52:03 +0800
committerJens Geyer <jensg@apache.org>2020-03-22 13:22:37 +0100
commit655f52590d23443a432a3326cbb64ca93cb4b90a (patch)
treebc967fd4d898d6b35e0276fbd41dbe21ca189290 /lib/c_glib
parent4b66a9d8812cf2c19f15382c56ec8e1327b6f2a1 (diff)
downloadthrift-655f52590d23443a432a3326cbb64ca93cb4b90a.tar.gz
Fix some compile warnings
Client: c_glib Patch: zeshuai007 <51382517@qq.com> This closes #2063
Diffstat (limited to 'lib/c_glib')
-rw-r--r--lib/c_glib/src/thrift/c_glib/processor/thrift_multiplexed_processor.c4
-rw-r--r--lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c12
2 files changed, 10 insertions, 6 deletions
diff --git a/lib/c_glib/src/thrift/c_glib/processor/thrift_multiplexed_processor.c b/lib/c_glib/src/thrift/c_glib/processor/thrift_multiplexed_processor.c
index 68a0f4d46..12a24a7f2 100644
--- a/lib/c_glib/src/thrift/c_glib/processor/thrift_multiplexed_processor.c
+++ b/lib/c_glib/src/thrift/c_glib/processor/thrift_multiplexed_processor.c
@@ -41,6 +41,8 @@ static GParamSpec *thrift_multiplexed_processor_obj_properties[PROP_THRIFT_MULTI
static gboolean
thrift_multiplexed_processor_register_processor_impl(ThriftProcessor *processor, const gchar * multiplexed_processor_name, ThriftProcessor * multiplexed_processor , GError **error)
{
+ THRIFT_UNUSED_VAR (error);
+
ThriftMultiplexedProcessor *self = THRIFT_MULTIPLEXED_PROCESSOR(processor);
g_hash_table_replace(self->multiplexed_services,
g_strdup(multiplexed_processor_name),
@@ -336,11 +338,9 @@ thrift_multiplexed_processor_init (ThriftMultiplexedProcessor *self)
self->default_processor_name = NULL;
}
-
gboolean
thrift_multiplexed_processor_register_processor(ThriftProcessor *processor, const gchar * multiplexed_processor_name, ThriftProcessor * multiplexed_processor , GError **error)
{
return THRIFT_MULTIPLEXED_PROCESSOR_GET_CLASS(processor)->register_processor(processor, multiplexed_processor_name, multiplexed_processor, error);
}
-
diff --git a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
index 216da4416..dcb2f8681 100644
--- a/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
+++ b/lib/c_glib/src/thrift/c_glib/transport/thrift_ssl_socket.c
@@ -80,7 +80,11 @@ static unsigned long thrift_ssl_socket_static_id_function(void)
#endif
}
-static void thrift_ssl_socket_static_locking_callback(int mode, int n, const char* unk, int id) {
+static void thrift_ssl_socket_static_locking_callback(int mode, int n, const char* unk, int id)
+{
+ THRIFT_UNUSED_VAR (unk);
+ THRIFT_UNUSED_VAR (id);
+
if (mode & CRYPTO_LOCK)
MUTEX_LOCK(thrift_ssl_socket_global_mutex_buf[n]);
else
@@ -175,15 +179,15 @@ void thrift_ssl_socket_get_ssl_error(ThriftSSLSocket *socket, const guchar *erro
break;
case SSL_ERROR_SYSCALL:
buffer_size-=snprintf(buffer, buffer_size, "%s: ", error_msg);
- buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%lX -> %s", errno, strerror(errno));
+ buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%X -> %s", errno, strerror(errno));
break;
case SSL_ERROR_WANT_READ:
buffer_size-=snprintf(buffer, buffer_size, "%s: ", error_msg);
- buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%lX -> %s", ssl_error_type, "Error while reading from underlaying layer");
+ buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%X -> %s", ssl_error_type, "Error while reading from underlaying layer");
break;
case SSL_ERROR_WANT_WRITE:
buffer_size-=snprintf(buffer, buffer_size, "%s: ", error_msg);
- buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%lX -> %s", ssl_error_type, "Error while writting to underlaying layer");
+ buffer_size-=snprintf(buffer+(1024-buffer_size), buffer_size, "%X -> %s", ssl_error_type, "Error while writting to underlaying layer");
break;
}