Mercurial > hg
changeset 1558:3df441efb7c2
Fix gcc warnings related to inline/static uses
author | Mikael Berthe <mikael@lilotux.net> |
---|---|
date | Fri, 10 Oct 2008 20:29:15 +0200 |
parents | 31422cb73356 |
children | 0674abda9a8f |
files | mcabber/libjabber/pool.c mcabber/src/jab_iq.c mcabber/src/jabglue.c mcabber/src/screen.c |
diffstat | 4 files changed, 17 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/mcabber/libjabber/pool.c Fri Oct 10 19:31:41 2008 +0200 +++ b/mcabber/libjabber/pool.c Fri Oct 10 20:29:15 2008 +0200 @@ -61,6 +61,8 @@ int pool__ltotal = 0; xht pool__disturbed = NULL; +inline void *_retried__malloc(size_t size); + /** * create a new memory allocation and increment the pool__total counter * @@ -101,7 +103,7 @@ * @param size how many bytes of memory we allocate * @return pointer to the allocated memory */ -inline void *_retried__malloc(size_t size) { +void *_retried__malloc(size_t size) { void *allocated_memory; int malloc_tries = 0;
--- a/mcabber/src/jab_iq.c Fri Oct 10 19:31:41 2008 +0200 +++ b/mcabber/src/jab_iq.c Fri Oct 10 20:29:15 2008 +0200 @@ -69,6 +69,8 @@ typedef void (*adhoc_command_callback)(jconn, char*, const char*, xmlnode); +inline double seconds_since_last_use(void); + struct adhoc_command { char *name; char *description; @@ -1468,7 +1470,7 @@ xmlnode_free(x); } -inline double seconds_since_last_use(void) +double seconds_since_last_use(void) { return difftime(time(NULL), iqlast); }
--- a/mcabber/src/jabglue.c Fri Oct 10 19:31:41 2008 +0200 +++ b/mcabber/src/jabglue.c Fri Oct 10 20:29:15 2008 +0200 @@ -72,6 +72,8 @@ static int evscallback_invitation(eviqs *evp, guint evcontext); +inline void update_last_use(void); + static void logger(jconn j, int io, const char *buf) { @@ -354,7 +356,7 @@ return mystatusmsg; } -inline void update_last_use(void) +void update_last_use(void) { iqlast = time(NULL); }
--- a/mcabber/src/screen.c Fri Oct 10 19:31:41 2008 +0200 +++ b/mcabber/src/screen.c Fri Oct 10 20:29:15 2008 +0200 @@ -155,6 +155,9 @@ unsigned int prefix_flags, int force_show, unsigned mucnicklen); +inline void scr_WriteMessage(const char *bjid, const char *text, + time_t timestamp, guint prefix_flags, + unsigned mucnicklen); inline void scr_UpdateBuddyWindow(void); inline void scr_set_chatmode(int enable); @@ -2028,9 +2031,9 @@ } #endif -inline void scr_WriteMessage(const char *bjid, const char *text, - time_t timestamp, guint prefix_flags, - unsigned mucnicklen) +void scr_WriteMessage(const char *bjid, const char *text, + time_t timestamp, guint prefix_flags, + unsigned mucnicklen) { char *xtext; @@ -2153,7 +2156,7 @@ } #if defined JEP0022 || defined JEP0085 -inline long int scr_GetChatStatesTimeout(time_t now) +long int scr_GetChatStatesTimeout(time_t now) { // Check if we're currently composing... if (chatstate != 1 || !chatstate_timestamp) @@ -2932,7 +2935,7 @@ // scr_cmdhisto_addline() // Add a line to the inputLine history -inline void scr_cmdhisto_addline(char *line) +static inline void scr_cmdhisto_addline(char *line) { int max_histo_lines;