Fixed warnings exposed by Visual C++

git-svn-id: http://voip.null.ro/svn/yate@4924 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
paulc 2012-02-17 17:22:02 +00:00
parent f2dadf8c57
commit 631c1083c6
3 changed files with 11 additions and 4 deletions

View File

@ -321,7 +321,7 @@ bool JsCode::link()
continue;
long int lbl = l->number();
for (unsigned int j = 0; j < n; i++) {
ExpOperation* jmp = static_cast<const ExpOperation*>(m_linked[j]);
const ExpOperation* jmp = static_cast<const ExpOperation*>(m_linked[j]);
if (!jmp || jmp->number() != lbl)
continue;
Opcode op = OpcNone;
@ -342,6 +342,7 @@ bool JsCode::link()
m_linked.set(new ExpOperation(op,0,offs,jmp->barrier()),j);
}
}
return true;
}
bool JsCode::keywordChar(char c) const
@ -932,7 +933,7 @@ bool JsCode::jumpRelative(long int offset, GenObject* context) const
return false;
unsigned int& index = static_cast<JsRunner*>(context)->m_index;
long int i = index + offset;
if (i < 0 || i > m_linked.length())
if (i < 0 || i > (long int)m_linked.length())
return false;
index = i;
return true;

View File

@ -57,9 +57,9 @@ bool ScriptParser::parseFile(const char* name, bool fragment)
int64_t len = f.length();
if (len <= 0 || len > 65535)
return false;
DataBlock data(0,len+1);
DataBlock data(0,(unsigned int)len+1);
char* text = (char*)data.data();
if (f.readData(text,len) != len)
if (f.readData(text,(int)len) != len)
return false;
text[len] = '\0';
return parse(text,fragment);

View File

@ -57,6 +57,12 @@ class ExpOperation;
class YSCRIPT_API ExpExtender
{
public:
/**
* Destructor
*/
virtual ~ExpExtender()
{ }
/**
* Retrieve the reference counted object owning this interface
* @return Pointer to object owning the extender, NULL if no ownership