[sr-dev] git:sr_3.0: lcr: compile & warning fixes for gcc 2.95

Andrei Pelinescu-Onciul andrei at iptel.org
Mon Oct 12 18:32:50 CEST 2009


Module: sip-router
Branch: sr_3.0
Commit: 663a4d47e1513296d78388ebed93a3d4d8bae8e7
URL:    http://git.sip-router.org/cgi-bin/gitweb.cgi/sip-router/?a=commit;h=663a4d47e1513296d78388ebed93a3d4d8bae8e7

Author: Andrei Pelinescu-Onciul <andrei at iptel.org>
Committer: Andrei Pelinescu-Onciul <andrei at iptel.org>
Date:   Mon Oct 12 16:45:27 2009 +0200

lcr: compile & warning fixes for gcc 2.95

- variables must be declared at the beginning of a block

---

 modules/lcr/lcr_mod.c |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/modules/lcr/lcr_mod.c b/modules/lcr/lcr_mod.c
index 26cfa48..549e570 100644
--- a/modules/lcr/lcr_mod.c
+++ b/modules/lcr/lcr_mod.c
@@ -399,6 +399,7 @@ static int mod_init(void)
     str s;
     unsigned short avp_flags;
     unsigned int i;
+    db1_con_t* dbh;
 
 	if(register_mi_mod(exports.name, mi_cmds)!=0)
 	{
@@ -556,7 +557,6 @@ static int mod_init(void)
     }
 
     /* Check table version */
-    db1_con_t* dbh;
     if (lcr_dbf.init==0){
 	LM_CRIT("unbound database\n");
 	return -1;
@@ -1277,7 +1277,7 @@ int reload_gws_and_lcrs(int lcr_id)
 	    first_gw = find_first_gw(gw_grps, grp_cnt, grp_id);
 	    if (first_gw == 0) {
 		LM_ERR("gw grp_id <%u> of prefix <%.*s> has no gateways\n",
-		       grp_id, prefix_len, prefix);
+		       grp_id, (int)prefix_len, prefix);
 		goto lcr_err;
 	    }
 	    if ((VAL_NULL(ROW_VALUES(row) + 3) == 1) ||
@@ -1892,7 +1892,7 @@ static int generate_uris(char *r_uri, str *r_uri_user, unsigned int *r_uri_len,
     destroy_avp(gu_avp);
 	
     LM_DBG("r_uri <%.*s>, dst_uri <%.*s>\n",
-	   *r_uri_len, r_uri, *dst_uri_len, dst_uri);
+	   (int)*r_uri_len, r_uri, (int)*dst_uri_len, dst_uri);
 
     return 1;
 }




More information about the sr-dev mailing list