mirror of
https://github.com/profanity-im/profanity.git
synced 2024-09-01 19:24:15 -04:00
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.
This commit is contained in:
parent
c94f3d0b4a
commit
a5db791dc4
@ -36,13 +36,13 @@ int accounts_remove(const char *jid)
|
|||||||
|
|
||||||
gchar** accounts_get_list(void)
|
gchar** accounts_get_list(void)
|
||||||
{
|
{
|
||||||
return (gchar **)mock();
|
return mock_ptr_type(gchar **);
|
||||||
}
|
}
|
||||||
|
|
||||||
ProfAccount* accounts_get_account(const char * const name)
|
ProfAccount* accounts_get_account(const char * const name)
|
||||||
{
|
{
|
||||||
check_expected(name);
|
check_expected(name);
|
||||||
return (ProfAccount*)mock();
|
return mock_ptr_type(ProfAccount*);
|
||||||
}
|
}
|
||||||
|
|
||||||
gboolean accounts_enable(const char * const name)
|
gboolean accounts_enable(const char * const name)
|
||||||
|
@ -31,12 +31,12 @@ void otr_shutdown(void) {}
|
|||||||
|
|
||||||
char* otr_libotr_version(void)
|
char* otr_libotr_version(void)
|
||||||
{
|
{
|
||||||
return (char*)mock();
|
return mock_ptr_type(char*);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* otr_start_query(void)
|
char* otr_start_query(void)
|
||||||
{
|
{
|
||||||
return (char*)mock();
|
return mock_ptr_type(char*);
|
||||||
}
|
}
|
||||||
|
|
||||||
void otr_poll(void) {}
|
void otr_poll(void) {}
|
||||||
@ -86,13 +86,13 @@ void otr_end_session(const char * const recipient) {}
|
|||||||
|
|
||||||
char * otr_get_my_fingerprint(void)
|
char * otr_get_my_fingerprint(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
char * otr_get_their_fingerprint(const char * const recipient)
|
char * otr_get_their_fingerprint(const char * const recipient)
|
||||||
{
|
{
|
||||||
check_expected(recipient);
|
check_expected(recipient);
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
char * otr_encrypt_message(const char * const to, const char * const message)
|
char * otr_encrypt_message(const char * const to, const char * const message)
|
||||||
|
@ -483,7 +483,7 @@ void occupantswin_occupants_all(void) {}
|
|||||||
// window interface
|
// window interface
|
||||||
ProfWin* win_create_console(void)
|
ProfWin* win_create_console(void)
|
||||||
{
|
{
|
||||||
return (ProfWin*)mock();
|
return mock_ptr_type(ProfWin*);
|
||||||
}
|
}
|
||||||
ProfWin* win_create_xmlconsole(void)
|
ProfWin* win_create_xmlconsole(void)
|
||||||
{
|
{
|
||||||
@ -491,7 +491,7 @@ ProfWin* win_create_xmlconsole(void)
|
|||||||
}
|
}
|
||||||
ProfWin* win_create_chat(const char * const barejid)
|
ProfWin* win_create_chat(const char * const barejid)
|
||||||
{
|
{
|
||||||
return (ProfWin*)mock();
|
return mock_ptr_type(ProfWin*);
|
||||||
}
|
}
|
||||||
ProfWin* win_create_muc(const char * const roomjid)
|
ProfWin* win_create_muc(const char * const roomjid)
|
||||||
{
|
{
|
||||||
|
@ -31,7 +31,7 @@ void session_shutdown(void) {}
|
|||||||
void session_process_events(void) {}
|
void session_process_events(void) {}
|
||||||
const char * connection_get_fulljid(void)
|
const char * connection_get_fulljid(void)
|
||||||
{
|
{
|
||||||
return (char *)mock();
|
return mock_ptr_type(char *);
|
||||||
}
|
}
|
||||||
|
|
||||||
const char * connection_get_domain(void)
|
const char * connection_get_domain(void)
|
||||||
@ -65,12 +65,12 @@ jabber_conn_status_t connection_get_status(void)
|
|||||||
|
|
||||||
char* connection_get_presence_msg(void)
|
char* connection_get_presence_msg(void)
|
||||||
{
|
{
|
||||||
return (char*)mock();
|
return mock_ptr_type(char*);
|
||||||
}
|
}
|
||||||
|
|
||||||
char* session_get_account_name(void)
|
char* session_get_account_name(void)
|
||||||
{
|
{
|
||||||
return (char*)mock();
|
return mock_ptr_type(char*);
|
||||||
}
|
}
|
||||||
|
|
||||||
GList * session_get_available_resources(void)
|
GList * session_get_available_resources(void)
|
||||||
@ -254,7 +254,7 @@ gboolean bookmark_join(const char *jid)
|
|||||||
|
|
||||||
GList * bookmark_get_list(void)
|
GList * bookmark_get_list(void)
|
||||||
{
|
{
|
||||||
return (GList *)mock();
|
return mock_ptr_type(GList *);
|
||||||
}
|
}
|
||||||
|
|
||||||
char * bookmark_find(const char * const search_str, gboolean previous)
|
char * bookmark_find(const char * const search_str, gboolean previous)
|
||||||
|
Loading…
Reference in New Issue
Block a user