Skip to content

Commit

Permalink
seas: fixed inline functions warnings for clang
Browse files Browse the repository at this point in the history
  • Loading branch information
miconda committed Jan 7, 2015
1 parent d7111b9 commit c52e4e1
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions modules/seas/ha.c
Expand Up @@ -314,7 +314,7 @@ static inline int send_ping(struct as_entry *the_as,struct timeval *now)
* 0 on success
* -1 on error
*/
inline int init_pingtable(struct ha *table,int timeout,int maxpings)
int init_pingtable(struct ha *table,int timeout,int maxpings)
{
if(maxpings<=0)
maxpings=1;
Expand Down Expand Up @@ -342,7 +342,7 @@ inline int init_pingtable(struct ha *table,int timeout,int maxpings)
return -1;
}

inline void destroy_pingtable(struct ha *table)
void destroy_pingtable(struct ha *table)
{
if(table->mutex){
lock_dealloc(table->mutex);
Expand Down
4 changes: 2 additions & 2 deletions modules/seas/ha.h
Expand Up @@ -59,6 +59,6 @@ char * create_ping_event(int *evt_len,int flags,unsigned int *seqno);
int prepare_ha(void);
int spawn_pinger(void);
int print_pingtable(struct ha *ta,int idx,int lock);
inline int init_pingtable(struct ha *table,int timeout,int maxpings);
inline void destroy_pingtable(struct ha *table);
int init_pingtable(struct ha *table,int timeout,int maxpings);
void destroy_pingtable(struct ha *table);
#endif
14 changes: 7 additions & 7 deletions modules/seas/statistics.c
Expand Up @@ -79,7 +79,7 @@ struct statstable* init_seas_stats_table(void)
return seas_stats_table;
}

inline void destroy_seas_stats_table(void)
static inline void destroy_seas_stats_table(void)
{
/*deallocs the table*/
if(seas_stats_table){
Expand All @@ -93,7 +93,7 @@ inline void destroy_seas_stats_table(void)
*
* TODO handle locking ?
*/
inline void as_relay_stat(struct cell *t)
void as_relay_stat(struct cell *t)
{
struct statscell *s;
struct totag_elem *to;
Expand Down Expand Up @@ -131,7 +131,7 @@ inline void as_relay_stat(struct cell *t)
*
* TODO handle locking/mutexing ?
*/
inline void event_stat(struct cell *t)
void event_stat(struct cell *t)
{
struct statscell *s;
struct totag_elem *to;
Expand Down Expand Up @@ -167,7 +167,7 @@ static inline int assignIndex(int i)
/** this will be called from the SEAS action dispatcher
* when it receives the action from the socket
*/
inline void action_stat(struct cell *t)
void action_stat(struct cell *t)
{
unsigned int seas_dispatch;
//unsigned int as_delay;
Expand Down Expand Up @@ -305,7 +305,7 @@ int start_stats_server(char *stats_socket)
* 1 if stats properly started
* -1 if error
*/
inline int stop_stats_server(void)
int stop_stats_server(void)
{
if(pid)
kill(SIGTERM,pid);
Expand Down Expand Up @@ -370,7 +370,7 @@ void serve_stats(int fd)
* this limit then the return value is the number of characters (not including the trailing '\\0') which would have been written to the final string
* if enough space had been available. Thus, a return value of size or more means that the output was truncated."
*/
inline int print_stats_info(int f,int sock)
static inline int print_stats_info(int f,int sock)
{
#define STATS_BUF_SIZE 400
int j,k,writen;
Expand Down Expand Up @@ -442,7 +442,7 @@ inline int print_stats_info(int f,int sock)
return -1;
}

inline void stats_reply(void)
void stats_reply(void)
{
lock_get(seas_stats_table->mutex);
seas_stats_table->received_replies++;
Expand Down
14 changes: 7 additions & 7 deletions modules/seas/statistics.h
Expand Up @@ -72,21 +72,21 @@ extern struct statstable *seas_stats_table;
* Initialize and destroy statistics table
*/
struct statstable* init_seas_stats_table(void);
inline int stop_stats_server(void);
inline void destroy_seas_stats_table(void);
int stop_stats_server(void);
static inline void destroy_seas_stats_table(void);
/** Statistics server process
* functions
*/
void serve_stats(int fd);
int start_stats_server(char *socket);
inline int print_stats_info(int f,int sock);
static inline int print_stats_info(int f,int sock);
/**
* Statistics functions
*/
inline void as_relay_stat(struct cell *t);
inline void event_stat(struct cell *t);
inline void action_stat(struct cell *t);
inline void stats_reply(void);
void as_relay_stat(struct cell *t);
void event_stat(struct cell *t);
void action_stat(struct cell *t);
void stats_reply(void);
#define receivedplus() \
do{ \
lock_get(seas_stats_table->mutex); \
Expand Down

0 comments on commit c52e4e1

Please sign in to comment.