Skip to content

Commit

Permalink
fix gcc 5.2 warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
razvancrainea committed Aug 24, 2015
1 parent d13c844 commit d2c08e9
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 11 deletions.
2 changes: 1 addition & 1 deletion modules/cachedb_redis/cachedb_redis_utils.c
Expand Up @@ -83,7 +83,7 @@ unsigned int redisHash(redis_con *con, str* key)
return crc16(key->s,key->len) & con->slots_assigned;
}

inline cluster_node *get_redis_connection(redis_con *con,str *key)
cluster_node *get_redis_connection(redis_con *con,str *key)
{
unsigned short hash_slot;
cluster_node *it;
Expand Down
2 changes: 1 addition & 1 deletion modules/cachedb_redis/cachedb_redis_utils.h
Expand Up @@ -29,7 +29,7 @@
#include "cachedb_redis_dbase.h"

int build_cluster_nodes(redis_con *con,char *info,int size);
extern inline cluster_node *get_redis_connection(redis_con *con,str *key);
cluster_node *get_redis_connection(redis_con *con,str *key);
void destroy_cluster_nodes(redis_con *con);

#endif
4 changes: 2 additions & 2 deletions modules/compression/compression_helpers.c
Expand Up @@ -407,7 +407,7 @@ int free_hdr_mask(struct hdr_field** hdr_mask)
return 0;
}

inline int check_zlib_rc(int rc)
int check_zlib_rc(int rc)
{
switch (rc) {
case Z_OK:
Expand All @@ -431,7 +431,7 @@ inline int check_zlib_rc(int rc)
}
}

inline int wrap_realloc(str* buf, int new_len)
int wrap_realloc(str* buf, int new_len)
{
if (buf->s==NULL) {
buf->s = pkg_malloc(new_len);
Expand Down
4 changes: 2 additions & 2 deletions modules/compression/compression_helpers.h
Expand Up @@ -41,6 +41,6 @@ int fixup_compression_flags(void**);
int free_whitelist(mc_whitelist_p* whitelist);
int free_hdr_list(struct hdr_field** hdr_lst_p);
int free_hdr_mask(struct hdr_field** hdr_mask);
extern inline int check_zlib_rc(int rc);
extern inline int wrap_realloc(str* buf, int new_len);
int check_zlib_rc(int rc);
int wrap_realloc(str* buf, int new_len);
#endif
2 changes: 1 addition & 1 deletion modules/db_berkeley/bdb_val.c
Expand Up @@ -45,7 +45,7 @@
* should be done in the val2str function, as some databases
* like db_berkeley don't need or like this at all.
*/
inline int bdb_time2str(time_t _v, char* _s, int* _l)
static inline int bdb_time2str(time_t _v, char* _s, int* _l)
{
struct tm* t;
int l;
Expand Down
2 changes: 1 addition & 1 deletion modules/db_perlvdb/perlvdbfunc.c
Expand Up @@ -36,7 +36,7 @@
* including decreasing ref cnt
*/

inline long IV2int(SV *in) {
static inline long IV2int(SV *in) {
int ret = -1;

if (SvOK(in)) {
Expand Down
2 changes: 1 addition & 1 deletion modules/perl/opensipsxs.xs
Expand Up @@ -399,7 +399,7 @@ char *pv_sprintf(struct sip_msg *m, char *fmt) {
* - strflag: flag mask to be or-applied for string match
*/

inline int sv2int_str(SV *val, int_str *is,
static inline int sv2int_str(SV *val, int_str *is,
unsigned short *flags, unsigned short strflag) {
char *s;
STRLEN len;
Expand Down
5 changes: 4 additions & 1 deletion modules/perl/perl.c
Expand Up @@ -311,6 +311,9 @@ struct mi_root* perl_mi_reload(struct mi_root *cmd_tree, void *param)
static int mod_init(void) {

int ret = 0;
static int argc = 1;
static char *argv_name = "opensips";
static char **argv = { &argv_name };

LM_INFO("initializing...\n");

Expand All @@ -330,7 +333,7 @@ static int mod_init(void) {
return -1;
}

PERL_SYS_INIT3(NULL, NULL, &environ);
PERL_SYS_INIT3(&argc, &argv, &environ);

if ((my_perl = parser_init())) {
ret = 0;
Expand Down
2 changes: 1 addition & 1 deletion modules/presence/publish.c
Expand Up @@ -117,7 +117,7 @@ static inline void presence_raise_event(presentity_t* presentity)
}


void inline build_extra_hdrs(struct sip_msg* msg, const str* map, str* extra_hdrs)
static inline void build_extra_hdrs(struct sip_msg* msg, const str* map, str* extra_hdrs)
{
struct hdr_field *hf;
str xtra_hdr_list[MAX_NO_OF_EXTRA_HDRS];
Expand Down

0 comments on commit d2c08e9

Please sign in to comment.