resource-encapsulation: Avoid reinterpret_cast in const_expr
authorPhilippe Coval <philippe.coval@osg.samsung.com>
Fri, 9 Sep 2016 17:12:26 +0000 (19:12 +0200)
committerUze Choi <uzchoi@samsung.com>
Mon, 12 Sep 2016 03:54:46 +0000 (03:54 +0000)
commitfdefa8c077e0d854984b6d40622f633fe1b1b6cf
treebe42b8a2f5ade36a6ad6e29907b083c0a2b93829
parent6b06fdadbadac7874da63f0150b7cd8e75fb31d5
resource-encapsulation: Avoid reinterpret_cast in const_expr

As unsupported in C++11 standard and g++-6 or clang

Reported error message is:

  service/resource-encapsulation/src/serverBuilder/unittests/RCSResourceObjectTest.cpp:368:13:
  error: reinterpret_cast from integer to pointer
  reinterpret_cast<OCRequestHandle>(0x1234);

Problem was observed while building for Yocto with generic toolchain:
  i586-poky-linux-g++ (GCC) 6.2.0

For reference see p125 of:

  http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3797.pdf

Change-Id: I20b21ad1bdac40c2aec44706501343ae1d9d7b69
Bug: https://jira.iotivity.org/browse/IOT-1111
Origin: https://github.com/tizenteam/meta-oic
Signed-off-by: Philippe Coval <philippe.coval@osg.samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/11663
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Uze Choi <uzchoi@samsung.com>
service/resource-encapsulation/src/serverBuilder/unittests/RCSResourceObjectTest.cpp