summaryrefslogtreecommitdiff
path: root/php/src
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-11-01 17:14:06 -0400
committerBernard Normier <bernard@zeroc.com>2018-11-01 17:14:06 -0400
commit3a763985c52246b1b804cdd7ee7bd49a82e76bd3 (patch)
treee35b1b0bdf6715ed784d0c86482355528bee81ee /php/src
parentVisual Studio and msbuild updates (diff)
downloadice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.tar.bz2
ice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.tar.xz
ice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.zip
Increase Visual Studio warning level to Level4
Fixes #223.
Diffstat (limited to 'php/src')
-rw-r--r--php/src/php7/Communicator.cpp4
-rw-r--r--php/src/php7/Operation.cpp8
-rw-r--r--php/src/php7/Types.cpp2
-rw-r--r--php/src/php7/Util.cpp7
4 files changed, 12 insertions, 9 deletions
diff --git a/php/src/php7/Communicator.cpp b/php/src/php7/Communicator.cpp
index fc8575820bc..85d9b2a401d 100644
--- a/php/src/php7/Communicator.cpp
+++ b/php/src/php7/Communicator.cpp
@@ -1224,7 +1224,7 @@ ZEND_FUNCTION(Ice_initialize)
member = "properties";
{
- if((data = zend_hash_str_find(Z_OBJPROP_P(zvinit), STRCAST(member.c_str()), member.size())))
+ if((data = zend_hash_str_find(Z_OBJPROP_P(zvinit), STRCAST(member.c_str()), member.size())) != 0)
{
assert(Z_TYPE_P(data) == IS_INDIRECT);
if(!fetchProperties(Z_INDIRECT_P(data), initData.properties))
@@ -1236,7 +1236,7 @@ ZEND_FUNCTION(Ice_initialize)
member = "logger";
{
- if((data = zend_hash_str_find(Z_OBJPROP_P(zvinit), STRCAST(member.c_str()), member.size())))
+ if((data = zend_hash_str_find(Z_OBJPROP_P(zvinit), STRCAST(member.c_str()), member.size())) != 0)
{
assert(Z_TYPE_P(data) == IS_INDIRECT);
if(!fetchLogger(Z_INDIRECT_P(data), initData.logger))
diff --git a/php/src/php7/Operation.cpp b/php/src/php7/Operation.cpp
index 2a460c44285..386f065e9e1 100644
--- a/php/src/php7/Operation.cpp
+++ b/php/src/php7/Operation.cpp
@@ -96,7 +96,7 @@ typedef IceUtil::Handle<OperationI> OperationIPtr;
//
// The base class for client-side invocations.
//
-class Invocation : public virtual IceUtil::Shared
+class Invocation : public IceUtil::Shared
{
public:
@@ -115,7 +115,7 @@ typedef IceUtil::Handle<Invocation> InvocationPtr;
// TypedInvocation uses the information in the given operation to validate, marshal, and unmarshal
// parameters and exceptions.
//
-class TypedInvocation : public virtual Invocation
+class TypedInvocation : public Invocation
{
public:
@@ -135,7 +135,7 @@ protected:
//
// A synchronous typed invocation.
//
-class SyncTypedInvocation : public virtual TypedInvocation
+class SyncTypedInvocation : public TypedInvocation
{
public:
@@ -717,7 +717,7 @@ IcePHP::TypedInvocation::checkTwowayOnly(const Ice::ObjectPrx& proxy) const
//
IcePHP::SyncTypedInvocation::SyncTypedInvocation(const Ice::ObjectPrx& prx, const CommunicatorInfoPtr& communicator,
const OperationIPtr& op) :
- Invocation(prx, communicator), TypedInvocation(prx, communicator, op)
+ TypedInvocation(prx, communicator, op)
{
}
diff --git a/php/src/php7/Types.cpp b/php/src/php7/Types.cpp
index 7add23fd1bd..47daa1d03b3 100644
--- a/php/src/php7/Types.cpp
+++ b/php/src/php7/Types.cpp
@@ -1058,7 +1058,7 @@ IcePHP::EnumInfo::EnumInfo(const string& ident, zval* en) :
zval* val;
zend_hash_internal_pointer_reset_ex(arr, &pos);
- while((val = zend_hash_get_current_data_ex(arr, &pos)))
+ while((val = zend_hash_get_current_data_ex(arr, &pos)) != 0)
{
assert(Z_TYPE_P(val) == IS_STRING);
string name = Z_STRVAL_P(val);
diff --git a/php/src/php7/Util.cpp b/php/src/php7/Util.cpp
index de78d13ce1f..37d7ace5128 100644
--- a/php/src/php7/Util.cpp
+++ b/php/src/php7/Util.cpp
@@ -265,9 +265,12 @@ IcePHP::extractIdentity(zval* zv, Ice::Identity& id)
zval categoryVal;
ZVAL_UNDEF(&categoryVal);
zval nameVal;
+ ZVAL_UNDEF(&nameVal);
- if(!getMember(zv, "category", &categoryVal, IS_STRING, false) ||
- !getMember(zv, "name", &nameVal, IS_STRING, true))
+ bool catOk = getMember(zv, "category", &categoryVal, IS_STRING, false);
+ bool nameOk = getMember(zv, "name", &nameVal, IS_STRING, true);
+
+ if(!catOk || !nameOk)
{
return false;
}