Silenced several benign warnings.
git-svn-id: http://yate.null.ro/svn/yate/trunk@1600 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
dabd23216d
commit
85a2f72b07
|
@ -338,7 +338,7 @@ IAXTransaction* IAXTransaction::sendMedia(const DataBlock& data, u_int32_t forma
|
|||
if (m_trunkFrame)
|
||||
m_trunkFrame->add(localCallNo(),data,m_lastMiniFrameOut);
|
||||
else {
|
||||
unsigned char b[4] = {localCallNo() >> 8,localCallNo(),m_lastMiniFrameOut >> 8,m_lastMiniFrameOut};
|
||||
unsigned char b[4] = {localCallNo() >> 8,localCallNo() & 0xff,m_lastMiniFrameOut >> 8,m_lastMiniFrameOut & 0xff};
|
||||
DataBlock buf(b,4);
|
||||
buf += data;
|
||||
m_engine->writeSocket(buf.data(),buf.length(),remoteAddr());
|
||||
|
|
|
@ -719,7 +719,7 @@ bool JBComponentStream::addEventNotify(JBEvent::Type type,
|
|||
{
|
||||
Lock lock(this);
|
||||
XMLElement* e = 0;
|
||||
bool raise = (element->id());
|
||||
bool raise = !element->id().null();
|
||||
if (raise) {
|
||||
e = element->release();
|
||||
JBEvent* ev = new JBEvent(type,this,e,&(element->id()));
|
||||
|
|
|
@ -454,7 +454,7 @@ JGEvent* JGSession::processEvent(JBEvent* jbev, u_int64_t time)
|
|||
JGEvent* event = 0;
|
||||
// Process state Ending
|
||||
if (state() == Ending) {
|
||||
bool response = isResponse(jbev);
|
||||
bool response = isResponse(jbev) != 0;
|
||||
if (response || time > m_timeout) {
|
||||
DDebug(m_engine,DebugAll,
|
||||
"Session. Terminated in state Ending. Reason: '%s'. [%p]",
|
||||
|
|
|
@ -1443,7 +1443,7 @@ public:
|
|||
* @return True if the resource has the required capability.
|
||||
*/
|
||||
inline bool hasCap(Capability capability) const
|
||||
{ return (m_capability & capability); }
|
||||
{ return (m_capability & capability) != 0; }
|
||||
|
||||
/**
|
||||
* Update resource from a presence element.
|
||||
|
@ -1658,14 +1658,14 @@ public:
|
|||
* @return True if the local user is subscribed to the remote one.
|
||||
*/
|
||||
inline bool subscribedTo() const
|
||||
{ return (m_subscription & To); }
|
||||
{ return (m_subscription & To) != 0; }
|
||||
|
||||
/**
|
||||
* Check if the remote user is subscribed to the local one.
|
||||
* @return True if the remote user is subscribed to the local one.
|
||||
*/
|
||||
inline bool subscribedFrom() const
|
||||
{ return (m_subscription & From); }
|
||||
{ return (m_subscription & From) != 0; }
|
||||
|
||||
/**
|
||||
* Process received error elements.
|
||||
|
|
|
@ -178,7 +178,7 @@ static inline bool skipBlanks(const char*& buffer, unsigned int& len)
|
|||
{
|
||||
for (; len && isBlank(*buffer); buffer++, len--)
|
||||
;
|
||||
return len;
|
||||
return (len != 0);
|
||||
}
|
||||
|
||||
// Get a line from a buffer until the first valid end-of-line or end of buffer was reached,
|
||||
|
|
|
@ -828,7 +828,7 @@ public:
|
|||
* @return True if the given command is known by this engine
|
||||
*/
|
||||
inline bool knownCommand(const char* cmd)
|
||||
{ Lock lock(this); return m_knownCommands.find(cmd); }
|
||||
{ Lock lock(this); return (m_knownCommands.find(cmd) != 0); }
|
||||
|
||||
/**
|
||||
* Add a command to the list of known commands
|
||||
|
|
|
@ -172,7 +172,7 @@ bool SignallingEngine::find(const SignallingComponent* component)
|
|||
if (!component)
|
||||
return false;
|
||||
Lock lock(this);
|
||||
return m_components.find(component);
|
||||
return m_components.find(component) != 0;
|
||||
}
|
||||
|
||||
void SignallingEngine::insert(SignallingComponent* component)
|
||||
|
@ -445,7 +445,7 @@ bool SignallingUtils::hasFlag(const NamedList& list, const char* param, const ch
|
|||
{
|
||||
String s = list.getValue(param);
|
||||
ObjList* obj = list.split(',',false);
|
||||
bool found = obj->find(flag);
|
||||
bool found = (obj->find(flag) != 0);
|
||||
TelEngine::destruct(obj);
|
||||
return found;
|
||||
}
|
||||
|
|
|
@ -302,7 +302,7 @@ void SS7Layer3::removeRoutes(SS7Layer3* network)
|
|||
void SS7Layer3::printRoutes()
|
||||
{
|
||||
String s;
|
||||
bool router = getObject("SS7Router");
|
||||
bool router = getObject("SS7Router") != 0;
|
||||
for (unsigned int i = 0; i < YSS7_PCTYPE_COUNT; i++) {
|
||||
ObjList* o = m_route[i].skipNull();
|
||||
if (!o)
|
||||
|
|
|
@ -111,7 +111,7 @@ public:
|
|||
return tmp;
|
||||
}
|
||||
inline bool addBoolParam(NamedList* dest, u_int8_t data, bool toggle) const {
|
||||
bool result = (bool)(toggle ? !(data & mask) : data & mask);
|
||||
bool result = (bool)toggle ? !(data & mask) : (data & mask);
|
||||
dest->addParam(name,String::boolText(result));
|
||||
return result;
|
||||
}
|
||||
|
@ -3478,7 +3478,7 @@ ISDNQ931Message* ISDNQ931Message::parse(ISDNQ931ParserData& parserData,
|
|||
#define Q931_MSG_PROTOQ931 0x08 // Q.931 protocol discriminator
|
||||
// Get bit 7 to check if the current byte is extended to the next one
|
||||
// Used to parse message IE
|
||||
#define Q931_EXT_FINAL(val) ((bool)(val & 0x80))
|
||||
#define Q931_EXT_FINAL(val) ((val & 0x80) != 0)
|
||||
|
||||
// Max values for some IEs
|
||||
#define Q931_MAX_BEARERCAPS_LEN 12
|
||||
|
@ -4310,7 +4310,7 @@ bool Q931Parser::createMessage(u_int8_t* data, u_int32_t len)
|
|||
// Call id length: bits 0-3 of the 2nd byte
|
||||
callRefLen = data[1] & 0x0f;
|
||||
// Initiator flag: bit 7 of the 3rd byte - 0: From initiator. 1: To initiator
|
||||
initiator = !(bool)(data[2] & 0x80);
|
||||
initiator = (data[2] & 0x80) == 0;
|
||||
// We should have at least (callRefLen + 3) bytes:
|
||||
// 1 for protocol discriminator, 1 for call reference length,
|
||||
// 1 for message type and the call reference
|
||||
|
@ -4651,7 +4651,7 @@ ISDNQ931IE* Q931Parser::decodeChannelID(ISDNQ931IE* ie, const u_int8_t* data,
|
|||
s_ie_ieChannelID[4].addParam(ie,data[0]); // Channel select for PRI interface
|
||||
// Optional Byte 1: Interface identifier if present
|
||||
u_int8_t crt = 1;
|
||||
bool interfaceIDExplicit = (bool)(data[0] & 0x40);
|
||||
bool interfaceIDExplicit = (data[0] & 0x40) != 0;
|
||||
if (interfaceIDExplicit) {
|
||||
if (len == 1)
|
||||
return errorParseIE(ie,s_errorWrongData,0,0);
|
||||
|
|
|
@ -1289,7 +1289,7 @@ void ModuleGroup::buildGroup(ModuleGroup* group, ObjList& spanList, String& erro
|
|||
*/
|
||||
// Incoming: msg=0. Outgoing: msg is the call execute message
|
||||
AnalogChannel::AnalogChannel(ModuleLine* line, Message* msg)
|
||||
: Channel(&plugin,0,msg),
|
||||
: Channel(&plugin,0,(msg != 0)),
|
||||
m_line(line),
|
||||
m_hungup(false),
|
||||
m_routeOnSecondRing(false),
|
||||
|
@ -1904,7 +1904,7 @@ bool AnalogChannel::setAudio(bool in)
|
|||
else
|
||||
Debug(this,DebugNote,"Failed to set data %s%s [%p]",
|
||||
in?"source":"consumer",cic?"":". Circuit is missing",this);
|
||||
return (bool)res;
|
||||
return res != 0;
|
||||
}
|
||||
|
||||
// Set call status
|
||||
|
|
|
@ -216,10 +216,10 @@ int DbConn::queryDbInternal()
|
|||
do {
|
||||
MYSQL_RES* res = mysql_store_result(m_conn);
|
||||
warns += mysql_warning_count(m_conn);
|
||||
affected += mysql_affected_rows(m_conn);
|
||||
affected += (unsigned int)mysql_affected_rows(m_conn);
|
||||
if (res) {
|
||||
unsigned int cols = mysql_num_fields(res);
|
||||
unsigned int rows = mysql_num_rows(res);
|
||||
unsigned int rows = (unsigned int)mysql_num_rows(res);
|
||||
Debug(&module,DebugAll,"Got result set %p rows=%u cols=%u",res,rows,cols);
|
||||
total += rows;
|
||||
if (m_msg) {
|
||||
|
|
|
@ -995,7 +995,7 @@ bool SigDriver::msgExecute(Message& msg, String& dest)
|
|||
}
|
||||
// Create channel
|
||||
SigChannel* sigCh = new SigChannel(msg,msg.getValue("caller"),dest,link);
|
||||
bool ok = sigCh->call();
|
||||
bool ok = sigCh->call() != 0;
|
||||
if (ok) {
|
||||
if (sigCh->connect(peer,msg.getValue("reason"))) {
|
||||
msg.setParam("peerid",sigCh->id());
|
||||
|
@ -2297,7 +2297,7 @@ bool SigIsdnCallRecord::update(SignallingEvent* event)
|
|||
default: ;
|
||||
}
|
||||
SignallingMessage* msg = event->message();
|
||||
bool chg = msg->params().getValue("circuit-change");
|
||||
bool chg = (msg->params().getValue("circuit-change") != 0);
|
||||
String format = msg->params().getValue("format");
|
||||
if (format)
|
||||
format = "2*" + format;
|
||||
|
|
|
@ -50,7 +50,7 @@
|
|||
Optimization="2"
|
||||
InlineFunctionExpansion="1"
|
||||
AdditionalIncludeDirectories=".,.."
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL"
|
||||
PreprocessorDefinitions="NDEBUG;WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
StringPooling="true"
|
||||
RuntimeLibrary="2"
|
||||
EnableFunctionLevelLinking="true"
|
||||
|
@ -144,7 +144,7 @@
|
|||
Name="VCCLCompilerTool"
|
||||
Optimization="0"
|
||||
AdditionalIncludeDirectories=".,.."
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL"
|
||||
PreprocessorDefinitions="_DEBUG;WIN32;_WINDOWS;_USRDLL;_CRT_SECURE_NO_DEPRECATE"
|
||||
MinimalRebuild="true"
|
||||
BasicRuntimeChecks="3"
|
||||
RuntimeLibrary="3"
|
||||
|
|
Loading…
Reference in New Issue