diff --git a/libs/yjabber/session.cpp b/libs/yjabber/session.cpp index 9686c4a7..f6b0d934 100644 --- a/libs/yjabber/session.cpp +++ b/libs/yjabber/session.cpp @@ -2146,7 +2146,7 @@ bool JGSession1::sendStreamHosts(const ObjList& hosts, String* stanzaId) return false; XmlElement* xml = XMPPUtils::createIq(XMPPUtils::IqSet,m_local,m_remote,0); xml->addChild(JGStreamHost::buildHosts(hosts,m_sid)); - return sendStanza(xml,stanzaId,true,false,m_engine->streamHostTimeout()); + return sendStanza(xml,stanzaId,true,false,(unsigned int)m_engine->streamHostTimeout()); } // Send a stanza with a stream host used diff --git a/libs/yrtp/dejitter.cpp b/libs/yrtp/dejitter.cpp index a3e57eae..69e4200f 100644 --- a/libs/yrtp/dejitter.cpp +++ b/libs/yrtp/dejitter.cpp @@ -172,7 +172,7 @@ void RTPDejitter::timerTick(const Time& when) TelEngine::destruct(packet); unsigned int count = 0; while ((packet = static_cast(m_packets.get()))) { - long delayed = when - packet->scheduled(); + long int delayed = (long int)(when - packet->scheduled()); if (delayed <= 0 || delayed <= (long)m_minDelay) break; // we are too delayed - probably rtpRecv() took too long to complete... diff --git a/libs/yrtp/session.cpp b/libs/yrtp/session.cpp index 1c22e884..d98179cb 100644 --- a/libs/yrtp/session.cpp +++ b/libs/yrtp/session.cpp @@ -404,7 +404,7 @@ RTPSender::RTPSender(RTPSession* session, bool randomTs) if (randomTs) { m_ts = Random::random() & ~1; // avoid starting sequence numbers too close to zero - m_seq = 2500 + (Random::random() % 60000); + m_seq = (uint16_t)(2500 + (Random::random() % 60000)); } } @@ -923,8 +923,8 @@ void RTPSession::sendRtcpReport(const Time& when) // Include a sender report buf[1] = 0xc8; // SR // NTP timestamp - store32(buf,len,2208988800 + (when.usec() / 1000000)); - store32(buf,len,((when.usec() % 1000000) << 32) / 1000000); + store32(buf,len,(uint32_t)(2208988800 + (when.usec() / 1000000))); + store32(buf,len,(uint32_t)(((when.usec() % 1000000) << 32) / 1000000)); // RTP timestamp store32(buf,len,m_send->tsLast()); // Packet and octet counters @@ -938,7 +938,7 @@ void RTPSession::sendRtcpReport(const Time& when) u_int32_t lost = m_recv->ioPacketsLost(); u_int32_t lostf = 0xff & (lost * 255 / (lost + m_recv->ioPackets())); store32(buf,len,(lost & 0xffffff) | (lostf << 24)); - store32(buf,len,m_recv->fullSeq()); + store32(buf,len,(uint32_t)m_recv->fullSeq()); // TODO: Compute and store Jitter, LSR and DLSR store32(buf,len,0); store32(buf,len,0); diff --git a/libs/yscript/evaluator.cpp b/libs/yscript/evaluator.cpp index 8e95a20f..40006b90 100644 --- a/libs/yscript/evaluator.cpp +++ b/libs/yscript/evaluator.cpp @@ -1286,7 +1286,7 @@ bool ExpEvaluator::runFunction(ObjList& stack, const ExpOperation& oper, GenObje &stack,oper.name().c_str(),oper.number(),context,(void*)m_extender); if (oper.name() == YSTRING("chr")) { String res; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* o = popValue(stack,context); if (!o) return gotError("ExpEvaluator stack underflow",oper.lineNumber()); @@ -1506,7 +1506,7 @@ ExpOperation* ExpOperation::clone(const char* name) const ExpOperation* ExpFunction::clone(const char* name) const { XDebug(DebugInfo,"ExpFunction::clone('%s') [%p]",name,this); - ExpFunction* op = new ExpFunction(name,number()); + ExpFunction* op = new ExpFunction(name,(long int)number()); op->lineNumber(lineNumber()); return op; } @@ -1632,7 +1632,7 @@ unsigned int TableEvaluator::evalLimit(GenObject* context) const ExpOperation* o = static_cast(first->get()); if (o->opcode() != ExpEvaluator::OpcPush) break; - int lim = o->number(); + int lim = (int)o->number(); if (lim < 0) lim = 0; m_limitVal = lim; diff --git a/libs/yscript/javascript.cpp b/libs/yscript/javascript.cpp index e3a7b1c7..18e6406f 100644 --- a/libs/yscript/javascript.cpp +++ b/libs/yscript/javascript.cpp @@ -588,7 +588,7 @@ bool JsContext::runFunction(ObjList& stack, const ExpOperation& oper, GenObject* int base = 0; ExpOperation* op2 = static_cast(args[1]); if (op2) { - base = op2->valInteger(); + base = (int)op2->valInteger(); if (base < 2 || base > 36) base = 0; } @@ -628,7 +628,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s if (extractArgs(stack,oper,context,args)) { ExpOperation* op = static_cast(args[0]); if (op && op->isInteger()) - idx = op->number(); + idx = (int)op->number(); } ExpEvaluator::pushOne(stack,new ExpOperation(String(str->at(idx)))); return true; @@ -640,7 +640,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s const String* what = static_cast(args[0]); if (what) { ExpOperation* from = static_cast(args[1]); - int offs = (from && from->isInteger()) ? from->number() : 0; + int offs = (from && from->isInteger()) ? (int)from->number() : 0; if (offs < 0) offs = 0; idx = str->find(*what,offs); @@ -656,10 +656,10 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s if (extractArgs(stack,oper,context,args)) { ExpOperation* op = static_cast(args[0]); if (op && op->isInteger()) - offs = op->number(); + offs = (int)op->number(); op = static_cast(args[1]); if (op && op->isInteger()) { - len = op->number(); + len = (int)op->number(); if (len < 0) len = 0; } @@ -789,7 +789,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s ExpOperation* op = YOBJECT(ExpOperation,str); if (op && op->isInteger()) { ExpOperation* tmp = static_cast(args[0]); - int radix = tmp ? tmp->valInteger() : 0; + int radix = tmp ? (int)tmp->valInteger() : 0; if (radix < 2 || radix > 36) radix = 10; static const char s_base[] = "0123456789abcdefghijklmnopqrstuvwxyz"; @@ -807,7 +807,7 @@ bool JsContext::runStringFunction(GenObject* obj, const String& name, ObjList& s s = buf + s; } while ((n = n / radix)); tmp = static_cast(args[1]); - int len = tmp ? tmp->valInteger() : 0; + int len = tmp ? (int)tmp->valInteger() : 0; if (len > 1) { if (neg) len--; @@ -905,7 +905,7 @@ bool JsCode::link() const ExpOperation* l = static_cast(m_linked[i]); if (!l || l->opcode() != OpcLabel) continue; - long int lbl = l->number(); + long int lbl = (long int)l->number(); if (lbl >= 0 && l->barrier()) entries++; for (unsigned int j = 0; j < n; j++) { @@ -938,7 +938,7 @@ bool JsCode::link() for (unsigned int j = 0; j < n; j++) { const ExpOperation* l = static_cast(m_linked[j]); if (l && l->barrier() && l->opcode() == OpcLabel && l->number() >= 0) { - m_entries[e].number = l->number(); + m_entries[e].number = (long int)l->number(); m_entries[e++].index = j; } } @@ -1372,7 +1372,7 @@ class ParseLoop : public ParseNested { friend class JsCode; public: - inline ParseLoop(JsCode* code, GenObject* nested, JsCode::JsOpcode oper, long int lblCont, long int lblBreak) + inline ParseLoop(JsCode* code, GenObject* nested, JsCode::JsOpcode oper, int64_t lblCont, int64_t lblBreak) : ParseNested(code,nested,oper), m_lblCont(lblCont), m_lblBreak(lblBreak) { } @@ -1537,9 +1537,9 @@ bool JsCode::parseSwitch(ParsePoint& expr, GenObject* nested) ExpOperation* j = static_cast(parseStack.m_cases.remove(false)); if (!j) break; - addOpcode(c,(int64_t)c->lineNumber()); + addOpcode(c,c->lineNumber()); addOpcode((Opcode)OpcCase); - addOpcode(j,(int64_t)c->lineNumber()); + addOpcode(j,c->lineNumber()); } // if no case matched drop the expression addOpcode(OpcDrop); @@ -1715,7 +1715,7 @@ bool JsCode::parseFuncDef(ParsePoint& expr, bool publish) expr++; addOpcode((Opcode)OpcReturn); addOpcode(OpcLabel,jump->number()); - JsFunction* obj = new JsFunction(0,name,&args,lbl->number(),this); + JsFunction* obj = new JsFunction(0,name,&args,(long int)lbl->number(),this); addOpcode(new ExpWrapper(obj,name)); if (publish && name && obj->ref()) m_globals.append(new ExpWrapper(obj,name)); @@ -2132,7 +2132,7 @@ bool JsCode::runOperation(ObjList& stack, const ExpOperation& oper, GenObject* c } if (!op) break; - ExpFunction ctr(op->name(),op->number()); + ExpFunction ctr(op->name(),(long int)op->number()); ctr.lineNumber(oper.lineNumber()); TelEngine::destruct(op); if (!runOperation(stack,ctr,context)) @@ -2165,7 +2165,7 @@ bool JsCode::runOperation(ObjList& stack, const ExpOperation& oper, GenObject* c bool ok = false; while (ExpOperation* drop = popAny(stack)) { ok = drop->barrier() && (drop->opcode() == OpcFunc); - long int lbl = drop->number(); + long int lbl = (long int)drop->number(); if (ok && (lbl < -1)) { lbl = -lbl; XDebug(this,DebugInfo,"Returning this=%p from constructor '%s'", @@ -2350,13 +2350,13 @@ bool JsCode::runOperation(ObjList& stack, const ExpOperation& oper, GenObject* c case OpcJump: case OpcJumpTrue: case OpcJumpFalse: - if (!jumpToLabel(oper.number(),context)) + if (!jumpToLabel((long int)oper.number(),context)) return gotError("Label not found",oper.lineNumber()); break; case OpcJRel: case OpcJRelTrue: case OpcJRelFalse: - if (!jumpRelative(oper.number(),context)) + if (!jumpRelative((long int)oper.number(),context)) return gotError("Relative jump failed",oper.lineNumber()); break; default: diff --git a/libs/yscript/jsobjects.cpp b/libs/yscript/jsobjects.cpp index cde9785b..2c902f4d 100644 --- a/libs/yscript/jsobjects.cpp +++ b/libs/yscript/jsobjects.cpp @@ -75,7 +75,7 @@ public: protected: inline JsDate(Mutex* mtx, u_int64_t msecs, bool local = false) : JsObject("Date",mtx), - m_time(msecs / 1000), m_msec(msecs % 1000), m_offs(Time::timeZone()) + m_time((unsigned int)(msecs / 1000)), m_msec((unsigned int)(msecs % 1000)), m_offs(Time::timeZone()) { if (local) m_time -= m_offs; } inline JsDate(Mutex* mtx, const char* name, unsigned int time, unsigned int msec, unsigned int offs) : JsObject(mtx,name), @@ -372,7 +372,7 @@ bool JsObject::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co ExpEvaluator::pushOne(stack,new ExpOperation(params())); else if (oper.name() == YSTRING("hasOwnProperty")) { bool ok = true; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (!op) continue; @@ -419,11 +419,11 @@ int JsObject::extractArgs(JsObject* obj, ObjList& stack, const ExpOperation& ope { if (!obj || !oper.number()) return 0; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = obj->popValue(stack,context); arguments.insert(op); } - return oper.number(); + return (int)oper.number(); } // Static helper method that deep copies all parameters @@ -597,19 +597,19 @@ bool JsArray::runNative(ObjList& stack, const ExpOperation& oper, GenObject* con return false; JsArray* array = new JsArray(mutex()); // copy this array - for (int32_t i = 0; i < m_length; i++) + for (int i = 0; i < m_length; i++) array->params().addParam(params().getParam(String(i))); array->setLength(length()); // add parameters (JsArray of JsObject) - for (int32_t i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); ExpWrapper* obj = YOBJECT(ExpWrapper,op); if (!obj) continue; JsArray* ja = (JsArray*)obj->getObject(YATOM("JsArray")); if (ja) { - for (int32_t i = 0; i < ja->length(); i++) - array->params().addParam(String(i + array->length()),ja->params().getValue(String(i))); + for (int j = 0; j < ja->length(); j++) + array->params().addParam(String(j + array->length()),ja->params().getValue(String(j))); array->setLength(array->length() + ja->length()); } else { @@ -691,7 +691,7 @@ bool JsArray::runNative(ObjList& stack, const ExpOperation& oper, GenObject* con // myFish after: ["drum", "lion", "angel", "clown"] // New length: 4 // shift array - int32_t shift = oper.number(); + int32_t shift = (int32_t)oper.number(); for (int32_t i = length(); i; i--) params().setParam(String(i - 1 + shift),params().getValue(String(i - 1))); for (int32_t i = shift; i; i--) { @@ -780,11 +780,11 @@ bool JsArray::runNativeSlice(ObjList& stack, const ExpOperation& oper, GenObject // < 0 offset from the end of the array // end missing -> go to end of array int begin = length(), end = length(); - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (op->isInteger()) { end = begin; - begin = op->number(); + begin = (int)op->number(); } TelEngine::destruct(op); } @@ -814,7 +814,7 @@ bool JsArray::runNativeSplice(ObjList& stack, const ExpOperation& oper, GenObjec return false; // get start index ExpOperation* op = static_cast(arguments[0]); - int begin = op->number(); + int begin = (int)op->number(); if (begin < 0) begin = length() + begin; // get count to delete @@ -822,7 +822,7 @@ bool JsArray::runNativeSplice(ObjList& stack, const ExpOperation& oper, GenObjec if (arguments.count() > 1) { // get count op = static_cast(arguments[1]); - count = op->number(); + count = (int)op->number(); } // remove elements @@ -965,7 +965,7 @@ bool JsMath::runNative(ObjList& stack, const ExpOperation& oper, GenObject* cont if (!oper.number()) return false; int64_t n = 0; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (op->isInteger()) n = op->number(); @@ -979,7 +979,7 @@ bool JsMath::runNative(ObjList& stack, const ExpOperation& oper, GenObject* cont if (!oper.number()) return false; int64_t n = LLONG_MIN; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (op->isInteger() && op->number() > n) n = op->number(); @@ -991,7 +991,7 @@ bool JsMath::runNative(ObjList& stack, const ExpOperation& oper, GenObject* cont if (!oper.number()) return false; int64_t n = LLONG_MAX; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (op->isInteger() && op->number() < n) n = op->number(); @@ -1055,7 +1055,7 @@ JsObject* JsDate::runConstructor(ObjList& stack, const ExpOperation& oper, GenOb ExpOperation* val = static_cast(args[i]); if (val) { if (val->isInteger()) - parts[i] = val->number(); + parts[i] = (int)val->number(); else return 0; } diff --git a/modules/analyzer.cpp b/modules/analyzer.cpp index 3d491c68..fb5bb260 100644 --- a/modules/analyzer.cpp +++ b/modules/analyzer.cpp @@ -623,7 +623,7 @@ void AnalyzerChan::localParams(String& str, Message* msg) bool AnalyzerChan::callRouted(Message& msg) { if (!m_timeRoute) - m_timeRoute = Time::now() - m_timeStart; + m_timeRoute = (unsigned long)(Time::now() - m_timeStart); setDuration(msg); return Channel::callRouted(msg); } @@ -631,14 +631,14 @@ bool AnalyzerChan::callRouted(Message& msg) bool AnalyzerChan::msgRinging(Message& msg) { if (!m_timeRing) - m_timeRing = Time::now() - m_timeStart; + m_timeRing = (unsigned long)(Time::now() - m_timeStart); return Channel::msgRinging(msg); } bool AnalyzerChan::msgAnswered(Message& msg) { if (!m_timeAnswer) - m_timeAnswer = Time::now() - m_timeStart; + m_timeAnswer = (unsigned long)(Time::now() - m_timeStart); addConsumer(); addSource(); return Channel::msgAnswered(msg); diff --git a/modules/cdrbuild.cpp b/modules/cdrbuild.cpp index f0297cbd..a02371e7 100644 --- a/modules/cdrbuild.cpp +++ b/modules/cdrbuild.cpp @@ -418,7 +418,7 @@ String CdrBuilder::getStatus() const "|" << getValue(YSTRING("billid")); unsigned int sec = 0; if (m_start) - sec = (Time::now() - m_start + 500000) / 1000000; + sec = (int)((Time::now() - m_start + 500000) / 1000000); s << "|" << sec; return s; } @@ -793,7 +793,7 @@ void CustomTimer::getRelativeTime(String& ret, u_int64_t time) String tmp = ret; int index = tmp.find(YSTRING("HH")); if (index >= 0) { - int h = timeLeft / 3600; + int h = (int)(timeLeft / 3600); timeLeft = timeLeft % 3600; String aux = ""; if (h <= 9) @@ -803,7 +803,7 @@ void CustomTimer::getRelativeTime(String& ret, u_int64_t time) index = tmp.find(YSTRING("mm")); if (index >= 0) { - int m = timeLeft / 60; + int m = (int)(timeLeft / 60); timeLeft = timeLeft % 60; String aux = ""; if (m <= 9) diff --git a/modules/javascript.cpp b/modules/javascript.cpp index 07a1364c..2a6c4609 100644 --- a/modules/javascript.cpp +++ b/modules/javascript.cpp @@ -552,10 +552,10 @@ bool JsEngAsync::run() { switch (m_oper) { case AsyncSleep: - Thread::sleep(m_val); + Thread::sleep((unsigned int)m_val); break; case AsyncUsleep: - Thread::usleep(m_val); + Thread::usleep((unsigned long)m_val); break; case AsyncYield: Thread::yield(); @@ -572,7 +572,7 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co { if (oper.name() == YSTRING("output")) { String str; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (str) str = *op + " " + str; @@ -586,12 +586,12 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co else if (oper.name() == YSTRING("debug")) { int level = DebugNote; String str; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (!op) continue; if ((i == 1) && oper.number() > 1 && op->isInteger()) - level = op->number(); + level = (int)op->number(); else if (*op) { if (str) str = *op + " " + str; @@ -615,14 +615,14 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co int level = -1; String info; String str; - for (long int i = oper.number(); i; i--) { + for (int i = (int)oper.number(); i; i--) { ExpOperation* op = popValue(stack,context); if (!op) continue; if (i == 1) { if (level < 0) { if (op->isInteger()) - level = op->number(); + level = (int)op->number(); else return false; } @@ -630,7 +630,7 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co info = *op; } else if ((i == 2) && oper.number() > 2 && op->isInteger()) - level = op->number(); + level = (int)op->number(); else if (*op) { if (str) str = *op + " " + str; @@ -760,7 +760,7 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co else if (oper.number() == 1) { ExpOperation* op = popValue(stack,context); if (op && op->isInteger()) - debugLevel(op->valInteger()); + debugLevel((int)op->valInteger()); TelEngine::destruct(op); } else @@ -783,7 +783,7 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co ExpOperation* op = popValue(stack,context); if (!(op && op->isInteger())) return false; - ExpEvaluator::pushOne(stack,new ExpOperation(debugAt(op->valInteger()))); + ExpEvaluator::pushOne(stack,new ExpOperation(debugAt((int)op->valInteger()))); TelEngine::destruct(op); } else @@ -845,7 +845,7 @@ bool JsEngine::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co if (!extractArgs(stack,oper,context,args)) return false; ExpOperation* id = static_cast(args[0]); - bool ret = m_worker->removeEvent(id->valInteger(),oper.name() == YSTRING("clearInterval")); + bool ret = m_worker->removeEvent((unsigned int)id->valInteger(),oper.name() == YSTRING("clearInterval")); ExpEvaluator::pushOne(stack,new ExpOperation(ret)); } else @@ -891,7 +891,7 @@ bool JsShared::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co ExpOperation* modulo = static_cast(args[1]); int mod = 0; if (modulo && modulo->isInteger()) - mod = modulo->number(); + mod = (int)modulo->number(); if (mod > 1) mod--; else @@ -911,7 +911,7 @@ bool JsShared::runNative(ObjList& stack, const ExpOperation& oper, GenObject* co ExpOperation* modulo = static_cast(args[1]); int mod = 0; if (modulo && modulo->isInteger()) - mod = modulo->number(); + mod = (int)modulo->number(); if (mod > 1) mod--; else @@ -1107,7 +1107,7 @@ bool JsMessage::runNative(ObjList& stack, const ExpOperation& oper, GenObject* c unsigned int priority = 100; if (prio) { if (prio->isInteger() && (prio->number() >= 0)) - priority = prio->number(); + priority = (unsigned int)prio->number(); else return false; } @@ -1277,7 +1277,7 @@ void JsMessage::getColumn(ObjList& stack, const ExpOperation* col, GenObject* co // [ val1, val2, val3 ] int idx = -1; if (col->isInteger()) - idx = col->number(); + idx = (int)col->number(); else { for (int i = 0; i < cols; i++) { GenObject* o = arr->get(i,0); @@ -1333,7 +1333,7 @@ void JsMessage::getRow(ObjList& stack, const ExpOperation* row, GenObject* conte if (row) { // { col1: val1, col2: val2 } if (row->isInteger()) { - int idx = row->number() + 1; + int idx = (int)row->number() + 1; if (idx > 0 && idx <= rows) { JsObject* jso = new JsObject("Object",mutex()); for (int c = 0; c < cols; c++) { @@ -1381,11 +1381,11 @@ void JsMessage::getResult(ObjList& stack, const ExpOperation& row, const ExpOper if (arr && arr->getRows() && row.isInteger()) { int rows = arr->getRows() - 1; int cols = arr->getColumns(); - int r = row.number(); + int r = (int)row.number(); if (r >= 0 && r < rows) { int c = -1; if (col.isInteger()) - c = col.number(); + c = (int)col.number(); else { for (int i = 0; i < cols; i++) { GenObject* o = arr->get(i,0); @@ -1615,7 +1615,7 @@ bool JsFile::runNative(ObjList& stack, const ExpOperation& oper, GenObject* cont return false; } bool ok = fTime->isInteger() && (fTime->number() >= 0) && - File::setFileTime(*fName,fTime->number()); + File::setFileTime(*fName,(unsigned int)fTime->number()); TelEngine::destruct(fTime); TelEngine::destruct(fName); ExpEvaluator::pushOne(stack,new ExpOperation(ok)); diff --git a/modules/server/regfile.cpp b/modules/server/regfile.cpp index 7582e7c1..d487e793 100644 --- a/modules/server/regfile.cpp +++ b/modules/server/regfile.cpp @@ -354,7 +354,7 @@ bool ExpireHandler::received(Message &msg) { if ((s_count = (s_count+1) % 30)) // Check for timeouts once at 30 seconds return false; - u_int64_t time = msg.msgTime().sec(); + unsigned int time = msg.msgTime().sec(); Lock lock(s_mutex); int count = s_accounts.sections(); for (int i = 0;i < count;) { diff --git a/modules/wavefile.cpp b/modules/wavefile.cpp index 1919b9da..67c1ec33 100644 --- a/modules/wavefile.cpp +++ b/modules/wavefile.cpp @@ -50,7 +50,7 @@ private: bool m_swap; unsigned m_rate; unsigned m_brate; - long m_repeatPos; + int64_t m_repeatPos; unsigned m_total; u_int64_t m_time; String m_id; diff --git a/modules/yrtpchan.cpp b/modules/yrtpchan.cpp index 637b7e12..be43d457 100644 --- a/modules/yrtpchan.cpp +++ b/modules/yrtpchan.cpp @@ -1177,7 +1177,7 @@ unsigned long YRTPConsumer::Consume(const DataBlock &data, unsigned long tStamp, XDebug(&splugin,DebugAll,"YRTPConsumer writing %d UDPTL bytes, ts=%lu [%p]", data.length(),tStamp,this); // for T.38 the timestamp is used as sequence number - m_wrap->udptl()->udptlSend(ptr,len,tStamp); + m_wrap->udptl()->udptlSend(ptr,len,(uint16_t)tStamp); return invalidStamp(); } if (!(m_wrap->bufSize() && m_wrap->rtp())) @@ -1266,7 +1266,7 @@ void YRTPMonitor::startup() void YRTPMonitor::saveStats(Message& msg) const { - unsigned int d = m_start ? ((m_last - m_start + 500000) / 1000000) : 0; + uint64_t d = m_start ? ((m_last - m_start + 500000) / 1000000) : 0; msg.addParam("rtp_rx_packets",String(m_rtpPackets)); msg.addParam("rtcp_rx_packets",String(m_rtcpPackets)); msg.addParam("rtp_rx_bytes",String(m_rtpBytes)); diff --git a/windows/_msgsniff.vcproj b/windows/_msgsniff.vcproj index fe8a0ae4..dc898d57 100644 --- a/windows/_msgsniff.vcproj +++ b/windows/_msgsniff.vcproj @@ -49,7 +49,7 @@ Optimization="2" InlineFunctionExpansion="1" AdditionalIncludeDirectories=".,.." - PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL" + PreprocessorDefinitions="WIN32;NDEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" StringPooling="true" RuntimeLibrary="2" EnableFunctionLevelLinking="true" @@ -143,7 +143,7 @@ Name="VCCLCompilerTool" Optimization="0" AdditionalIncludeDirectories=".,.." - PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL" + PreprocessorDefinitions="WIN32;_DEBUG;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE" MinimalRebuild="true" BasicRuntimeChecks="3" RuntimeLibrary="3" diff --git a/windows/libilbc.vcproj b/windows/libilbc.vcproj index 7069612d..1711c7ae 100644 --- a/windows/libilbc.vcproj +++ b/windows/libilbc.vcproj @@ -53,7 +53,7 @@ ProgramDataBaseFileName=".\Debug\ilbc/" WarningLevel="3" SuppressStartupBanner="true" - DebugInformationFormat="4" + DebugInformationFormat="3" /> + + @@ -232,10 +236,6 @@ /> - - @@ -262,6 +262,10 @@ RelativePath="..\libs\miniwebrtc\audio\coding_isac\fix\arith_routines_hist.c" > + + @@ -284,10 +288,6 @@ /> - - @@ -308,10 +308,6 @@ RelativePath="..\libs\miniwebrtc\audio\common\processing\auto_correlation.c" > - - @@ -334,6 +330,10 @@ /> + + @@ -462,10 +462,6 @@ /> - - @@ -488,6 +484,10 @@ /> + + @@ -544,10 +544,6 @@ RelativePath="..\libs\miniwebrtc\audio\processing\echo_control_mobile_impl.cc" > - - @@ -592,6 +588,10 @@ /> + + @@ -616,6 +616,10 @@ RelativePath="..\libs\miniwebrtc\audio\coding_ilbc\enhancer_interface.c" > + + @@ -638,10 +642,6 @@ /> - - @@ -692,34 +692,12 @@ RelativePath="..\libs\miniwebrtc\audio\common\processing\filter_ma_fast_q12.c" > - - - - - - - - + + + + + + + + @@ -848,6 +848,10 @@ RelativePath="..\libs\miniwebrtc\audio\coding_isac\fix\isacfix.c" > + + @@ -870,10 +874,6 @@ /> - - @@ -992,10 +992,6 @@ RelativePath="..\libs\miniwebrtc\audio\coding_ilbc\pack_bits.c" > - - @@ -1018,6 +1014,10 @@ /> + + @@ -1044,10 +1044,6 @@ /> - - @@ -1071,7 +1067,7 @@ + + @@ -1176,6 +1176,10 @@ RelativePath="..\libs\miniwebrtc\audio\coding_ilbc\sort_sq.c" > + + @@ -1198,10 +1202,6 @@ /> - - @@ -1260,10 +1260,6 @@ RelativePath="..\libs\miniwebrtc\audio\coding_ilbc\swap_bytes.c" > - - @@ -1286,6 +1282,10 @@ /> + + @@ -1400,11 +1400,11 @@ > - - + + @@ -1900,11 +1900,11 @@ >