浏览代码

seas: fixed inline functions warnings for clang

Daniel-Constantin Mierla 10 年之前
父节点
当前提交
c52e4e13ea
共有 4 个文件被更改,包括 18 次插入18 次删除
  1. 2 2
      modules/seas/ha.c
  2. 2 2
      modules/seas/ha.h
  3. 7 7
      modules/seas/statistics.c
  4. 7 7
      modules/seas/statistics.h

+ 2 - 2
modules/seas/ha.c

@@ -314,7 +314,7 @@ error:
  * 	0 on success
  * 	0 on success
  * 	-1 on error
  * 	-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)
    if(maxpings<=0)
       maxpings=1;
       maxpings=1;
@@ -342,7 +342,7 @@ error:
    return -1;
    return -1;
 }
 }
 
 
-inline void destroy_pingtable(struct ha *table)
+void destroy_pingtable(struct ha *table)
 {
 {
    if(table->mutex){
    if(table->mutex){
       lock_dealloc(table->mutex);
       lock_dealloc(table->mutex);

+ 2 - 2
modules/seas/ha.h

@@ -59,6 +59,6 @@ char * create_ping_event(int *evt_len,int flags,unsigned int *seqno);
 int prepare_ha(void);
 int prepare_ha(void);
 int spawn_pinger(void);
 int spawn_pinger(void);
 int print_pingtable(struct ha *ta,int idx,int lock);
 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
 #endif

+ 7 - 7
modules/seas/statistics.c

@@ -79,7 +79,7 @@ struct statstable* init_seas_stats_table(void)
    return seas_stats_table;
    return seas_stats_table;
 }
 }
 
 
-inline void destroy_seas_stats_table(void)
+static inline void destroy_seas_stats_table(void)
 {
 {
    /*deallocs the table*/
    /*deallocs the table*/
    if(seas_stats_table){
    if(seas_stats_table){
@@ -93,7 +93,7 @@ inline void destroy_seas_stats_table(void)
  *
  *
  * TODO handle locking ?
  * TODO handle locking ?
  */
  */
-inline void as_relay_stat(struct cell *t)
+void as_relay_stat(struct cell *t)
 {
 {
    struct statscell *s;
    struct statscell *s;
    struct totag_elem *to;
    struct totag_elem *to;
@@ -131,7 +131,7 @@ inline void as_relay_stat(struct cell *t)
  *
  *
  * TODO handle locking/mutexing ?
  * TODO handle locking/mutexing ?
  */
  */
-inline void event_stat(struct cell *t)
+void event_stat(struct cell *t)
 {
 {
    struct statscell *s;
    struct statscell *s;
    struct totag_elem *to;
    struct totag_elem *to;
@@ -167,7 +167,7 @@ static inline int assignIndex(int i)
 /** this will be called from the SEAS action dispatcher
 /** this will be called from the SEAS action dispatcher
  * when it receives the action from the socket
  * 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 seas_dispatch;
    //unsigned int as_delay;
    //unsigned int as_delay;
@@ -305,7 +305,7 @@ error:
  * 1 if stats properly started
  * 1 if stats properly started
  * -1 if error
  * -1 if error
  */
  */
-inline int stop_stats_server(void)
+int stop_stats_server(void)
 {
 {
    if(pid)
    if(pid)
       kill(SIGTERM,pid);
       kill(SIGTERM,pid);
@@ -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
  * 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."
  * 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
 #define STATS_BUF_SIZE  400
    int j,k,writen;
    int j,k,writen;
@@ -442,7 +442,7 @@ error:/*mutex is locked*/
    return -1;
    return -1;
 }
 }
 
 
-inline void stats_reply(void)
+void stats_reply(void)
 {
 {
    lock_get(seas_stats_table->mutex);
    lock_get(seas_stats_table->mutex);
    seas_stats_table->received_replies++;
    seas_stats_table->received_replies++;

+ 7 - 7
modules/seas/statistics.h

@@ -72,21 +72,21 @@ extern struct statstable *seas_stats_table;
  * Initialize and destroy statistics table
  * Initialize and destroy statistics table
  */
  */
 struct statstable* init_seas_stats_table(void);
 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
 /** Statistics server process
  * functions
  * functions
  */
  */
 void serve_stats(int fd);
 void serve_stats(int fd);
 int start_stats_server(char *socket);
 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
  * 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() \
 #define receivedplus() \
    do{ \
    do{ \
       lock_get(seas_stats_table->mutex); \
       lock_get(seas_stats_table->mutex); \