Module: sems
Branch: master
Commit: 123de0986854128caad53ee21e325a83cb73c7b9
URL:    
http://git.sip-router.org/cgi-bin/gitweb.cgi/sems/?a=commit;h=123de0986854128caad53ee21e325a83cb73c7b9

Author: Stefan Sayer <[email protected]>
Committer: Stefan Sayer <[email protected]>
Date:   Wed Dec 15 01:12:05 2010 +0100

fix more size_t->unsigned casting for int2str

---

 apps/dsm/DSMCoreModule.cpp           |    6 +++---
 apps/dsm/mods/mod_utils/ModUtils.cpp |    4 ++--
 apps/webconference/WebConference.cpp |    6 +++---
 3 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/apps/dsm/DSMCoreModule.cpp b/apps/dsm/DSMCoreModule.cpp
index 189045b..61df6bd 100644
--- a/apps/dsm/DSMCoreModule.cpp
+++ b/apps/dsm/DSMCoreModule.cpp
@@ -888,7 +888,7 @@ bool TestDSMCondition::match(AmSession* sess, DSMSession* 
sc_sess, DSMCondition:
   string r;
   if (lhs.length() > 5 && 
       (lhs.substr(0, 4) == "len(") && lhs[lhs.length()-1] == ')') {
-    l = int2str(resolveVars(lhs.substr(4, lhs.length()-5), sess, sc_sess, 
event_params).length());
+    l = int2str((unsigned int)resolveVars(lhs.substr(4, lhs.length()-5), sess, 
sc_sess, event_params).length());
   } else {    
     l   = resolveVars(lhs, sess, sc_sess, event_params);
   }
@@ -1124,11 +1124,11 @@ EXEC_ACTION_START(SCDIAction) {
       for (size_t i=0;i<sc_sess->di_res.size();i++) {
        switch (sc_sess->di_res.get(i).getType()) {
        case AmArg::CStr: {
-         sc_sess->var["DI_res"+int2str(i)] = 
+         sc_sess->var["DI_res"+int2str((unsigned int)i)] =
            sc_sess->di_res.get(i).asCStr();
        } break;
        case AmArg::Int: {
-         sc_sess->var["DI_res"+int2str(i)] = 
+         sc_sess->var["DI_res"+int2str((unsigned int)i)] =
            int2str(sc_sess->di_res.get(i).asInt());
        } break;
        default: {
diff --git a/apps/dsm/mods/mod_utils/ModUtils.cpp 
b/apps/dsm/mods/mod_utils/ModUtils.cpp
index a4f55e5..e62e00d 100644
--- a/apps/dsm/mods/mod_utils/ModUtils.cpp
+++ b/apps/dsm/mods/mod_utils/ModUtils.cpp
@@ -229,11 +229,11 @@ EXEC_ACTION_START(SCUSplitStringAction) {
     p = str.find("\n", last_p);
     if (p==string::npos) {
       if (last_p < str.length())
-       sc_sess->var[dst_array+"["+int2str(cntr)+"]"] = str.substr(last_p);
+       sc_sess->var[dst_array+"["+int2str((unsigned int)cntr)+"]"] = 
str.substr(last_p);
       break;
     }
     
-    sc_sess->var[dst_array+"["+int2str(cntr++)+"]"] = str.substr(last_p, 
p-last_p);
+    sc_sess->var[dst_array+"["+int2str((unsigned int)cntr++)+"]"] = 
str.substr(last_p, p-last_p);
 
     last_p = p+1;    
   }
diff --git a/apps/webconference/WebConference.cpp 
b/apps/webconference/WebConference.cpp
index eb3db51..ac205b9 100644
--- a/apps/webconference/WebConference.cpp
+++ b/apps/webconference/WebConference.cpp
@@ -875,7 +875,7 @@ void WebConferenceFactory::vqRoomFeedback(const AmArg& 
args, AmArg& ret) {
   int opinion = args.get(2).asInt();
 
   saveFeedback(string("RO "+ room + "|||" + adminpin + "|||" + 
-              int2str(opinion) + "|||" + int2str(time(NULL)) + "|||\n"));
+                     int2str(opinion) + "|||" + int2str((unsigned 
int)time(NULL)) + "|||\n"));
 
   ret.push(0);
   ret.push("OK");
@@ -888,7 +888,7 @@ void WebConferenceFactory::vqCallFeedback(const AmArg& 
args, AmArg& ret) {
   int opinion = args.get(3).asInt();
 
   saveFeedback("CA|||"+ room + "|||" + adminpin + "|||" + tag + "|||" + 
-              int2str(opinion) + "|||" + int2str(time(NULL)) + "|||\n");
+              int2str(opinion) + "|||" + int2str((unsigned int)time(NULL)) + 
"|||\n");
 
   ret.push(0);
   ret.push("OK");
@@ -902,7 +902,7 @@ void WebConferenceFactory::vqConferenceFeedback(const 
AmArg& args, AmArg& ret) {
   int opinion = args.get(4).asInt();
 
   saveFeedback("CO|||"+ room + "|||" + adminpin + "|||" + int2str(opinion) + 
"|||" + 
-              sender + "|||" + comment +"|||" + int2str(time(NULL)) + "|||\n");
+              sender + "|||" + comment +"|||" + int2str((unsigned 
int)time(NULL)) + "|||\n");
 
   ret.push(0);
   ret.push("OK");

_______________________________________________
Semsdev mailing list
[email protected]
http://lists.iptel.org/mailman/listinfo/semsdev

Reply via email to