diff options
author | Frank Zschockelt <profanity@freakysoft.de> | 2019-05-08 21:51:29 +0200 |
---|---|---|
committer | Frank Zschockelt <profanity@freakysoft.de> | 2019-05-08 21:51:29 +0200 |
commit | a5db791dc484bfde7df067911d8ee9f95968b88d (patch) | |
tree | bac196bad0d3eef71ce730ec7e9dca1794e25625 /tests/unittests/xmpp | |
parent | c94f3d0b4ad3dbad3f33cbe0d7c19c6cd41e7aea (diff) | |
download | profani-tty-a5db791dc484bfde7df067911d8ee9f95968b88d.tar.gz |
Use mock_ptr_type() to silence compiler warnings
Unit tests on 32-bit architectures were failing due to "cast to pointer from integer of different size" warnings. mock_ptr_type silences those by first casting to uintptr_t.
Diffstat (limited to 'tests/unittests/xmpp')
-rw-r--r-- | tests/unittests/xmpp/stub_xmpp.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/unittests/xmpp/stub_xmpp.c b/tests/unittests/xmpp/stub_xmpp.c index 53a729e6..eb4945ea 100644 --- a/tests/unittests/xmpp/stub_xmpp.c +++ b/tests/unittests/xmpp/stub_xmpp.c @@ -31,7 +31,7 @@ void session_shutdown(void) {} void session_process_events(void) {} const char * connection_get_fulljid(void) { - return (char *)mock(); + return mock_ptr_type(char *); } const char * connection_get_domain(void) @@ -65,12 +65,12 @@ jabber_conn_status_t connection_get_status(void) char* connection_get_presence_msg(void) { - return (char*)mock(); + return mock_ptr_type(char*); } char* session_get_account_name(void) { - return (char*)mock(); + return mock_ptr_type(char*); } GList * session_get_available_resources(void) @@ -254,7 +254,7 @@ gboolean bookmark_join(const char *jid) GList * bookmark_get_list(void) { - return (GList *)mock(); + return mock_ptr_type(GList *); } char * bookmark_find(const char * const search_str, gboolean previous) |