wangyunjian created THRIFT-5256: ----------------------------------- Summary: Fix some compile warnings Key: THRIFT-5256 URL: https://issues.apache.org/jira/browse/THRIFT-5256 Project: Thrift Issue Type: Bug Components: C glib - Library Affects Versions: 0.13.0 Reporter: wangyunjian Assignee: wangyunjian
The compile warnings: src/thrift/c_glib/transport/thrift_ssl_socket.c:790:35: warning: pointer targets in passing argument 1 of ‘thrift_ssl_socket_get_error’ differ in signedness [-Wpointer-sign] thrift_ssl_socket_get_error("No cipher overlay", THRIFT_SSL_SOCKET_ERROR_CIPHER_NOT_AVAILABLE, error); ^~~~~~~~~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c:206:6: note: expected ‘const guchar *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’ void thrift_ssl_socket_get_error(const guchar *error_msg, guint thrift_error_no, GError **error) src/thrift/c_glib/transport/thrift_ssl_socket.c:309:48: warning: pointer targets in passing argument 2 of ‘thrift_ssl_socket_get_ssl_error’ differ in signedness [-Wpointer-sign] thrift_ssl_socket_get_ssl_error(ssl_socket, "Receive error", ^~~~~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c:158:6: note: expected ‘const guchar *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’ void thrift_ssl_socket_get_ssl_error(ThriftSSLSocket *socket, const guchar *error_msg, guint thrift_error_no, int ssl_error, GError **error) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c: In function ‘thrift_ssl_socket_write’: src/thrift/c_glib/transport/thrift_ssl_socket.c:345:48: warning: pointer targets in passing argument 2 of ‘thrift_ssl_socket_get_ssl_error’ differ in signedness [-Wpointer-sign] thrift_ssl_socket_get_ssl_error(ssl_socket, "Send error", ^~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c:158:6: note: expected ‘const guchar *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’ void thrift_ssl_socket_get_ssl_error(ThriftSSLSocket *socket, const guchar *error_msg, guint thrift_error_no, int ssl_error, GError **error) ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c: In function ‘thrift_ssl_socket_handle_handshake’: src/thrift/c_glib/transport/thrift_ssl_socket.c:410:48: warning: pointer targets in passing argument 2 of ‘thrift_ssl_socket_get_ssl_error’ differ in signedness [-Wpointer-sign] thrift_ssl_socket_get_ssl_error(ssl_socket, "Error while connect/bind", THRIFT_SSL_SOCKET_ERROR_CONNECT_BIND, rc, error); ^~~~~~~~~~~~~~~~~~~~~~~~~~ src/thrift/c_glib/transport/thrift_ssl_socket.c:158:6: note: expected ‘const guchar *’ {aka ‘const unsigned char *’} but argument is of type ‘char *’ void thrift_ssl_socket_get_ssl_error(ThriftSSLSocket *socket, const guchar *error_msg, guint thrift_error_no, int ssl_error, GError **error) src/thrift/c_glib/transport/thrift_socket.c: In function ‘thrift_socket_open’: src/thrift/c_glib/transport/thrift_socket.c:154:29: warning: passing argument 1 of ‘thrift_socket_close’ from incompatible pointer type [-Wincompatible-pointer-types] thrift_socket_close(tsocket, NULL); ^~~~~~~ src/thrift/c_glib/transport/thrift_socket.c:103:39: note: expected ‘ThriftTransport *’ {aka ‘struct _ThriftTransport *’} but argument is of type ‘ThriftSocket *’ {aka ‘struct _ThriftSocket *’} thrift_socket_close (ThriftTransport *transport, GError **error) src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c:60:9: warning: implicit declaration of function ‘thrift_protocol_decorator_write_message_begin’; did you mean ‘thrift_protocol_write_message_begin’? [-Wimplicit-function-declaration] ret = thrift_protocol_decorator_write_message_begin(protocol, service_name, message_type, seqid, error); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ thrift_protocol_write_message_begin src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c: In function ‘thrift_multiplexed_protocol_class_init’: src/thrift/c_glib/protocol/thrift_multiplexed_protocol.c:142:28: warning: assignment to ‘gint32 (*)(ThriftProtocol *, const gchar *, const ThriftMessageType, const gint32, GError **)’ {aka ‘int (*)(struct _ThriftProtocol *, const char *, const enum <anonymous>, const int, struct _GError **)’} from incompatible pointer type ‘gint32 (*)(ThriftMultiplexedProtocol *, const gchar *, const ThriftMessageType, const gint32, GError **)’ {aka ‘int (*)(struct _ThriftMultiplexedProtocol *, const char *, const enum <anonymous>, const int, struct _GError **)’} [-Wincompatible-pointer-types] cls->write_message_begin = thrift_multiplexed_protocol_write_message_begin; -- This message was sent by Atlassian Jira (v8.3.4#803005)