To avoid warnings on some compilers added extra parens to if ((error = func()))
diff --git a/ndn-cpp/encoding/binary-xml-decoder.hpp b/ndn-cpp/encoding/binary-xml-decoder.hpp
index d4304b0..ae04831 100644
--- a/ndn-cpp/encoding/binary-xml-decoder.hpp
+++ b/ndn-cpp/encoding/binary-xml-decoder.hpp
@@ -36,7 +36,7 @@
{
int gotExpectedTag;
ndn_Error error;
- if (error = ndn_BinaryXmlDecoder_peekDTag(this, expectedTag, &gotExpectedTag))
+ if ((error = ndn_BinaryXmlDecoder_peekDTag(this, expectedTag, &gotExpectedTag)))
throw std::runtime_error(ndn_getErrorString(error));
return gotExpectedTag;
diff --git a/ndn-cpp/encoding/binary-xml-structure-decoder.hpp b/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
index 331f3d3..e83dd5b 100644
--- a/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
+++ b/ndn-cpp/encoding/binary-xml-structure-decoder.hpp
@@ -32,7 +32,7 @@
bool findElementEnd(unsigned char *input, unsigned int inputLength)
{
ndn_Error error;
- if (error = ndn_BinaryXmlStructureDecoder_findElementEnd(this, input, inputLength))
+ if ((error = ndn_BinaryXmlStructureDecoder_findElementEnd(this, input, inputLength)))
throw std::runtime_error(ndn_getErrorString(error));
return gotElementEnd();
}
diff --git a/ndn-cpp/encoding/binary-xml-wire-format.cpp b/ndn-cpp/encoding/binary-xml-wire-format.cpp
index f4ddf78..7556777 100644
--- a/ndn-cpp/encoding/binary-xml-wire-format.cpp
+++ b/ndn-cpp/encoding/binary-xml-wire-format.cpp
@@ -49,7 +49,7 @@
BinaryXmlDecoder decoder(input, inputLength);
ndn_Error error;
- if (error = ndn_decodeBinaryXmlInterest(&interestStruct, &decoder))
+ if ((error = ndn_decodeBinaryXmlInterest(&interestStruct, &decoder)))
throw std::runtime_error(ndn_getErrorString(error));
interest.set(interestStruct);
@@ -78,7 +78,7 @@
BinaryXmlDecoder decoder(input, inputLength);
ndn_Error error;
- if (error = ndn_decodeBinaryXmlData(&dataStruct, &decoder))
+ if ((error = ndn_decodeBinaryXmlData(&dataStruct, &decoder)))
throw std::runtime_error(ndn_getErrorString(error));
data.set(dataStruct);