Project

Profile

Help

Bug #2652

closed

cast from ‘jobject {aka __jobject*}’ to ‘jint {aka int}’ loses precision [-fpermissive]

Added by O'Neil Delpratt about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
C++ API
Start date:
2016-02-26
Due date:
% Done:

100%

Estimated time:
Found in version:
1.0.0
Fixed in version:
1.0.1
Platforms:

Description

On some 64-bit linux machine the following error occurs when building Saxon/C on C++:

../../Saxon.C.API/XdmNode.cpp: In member function ‘int XdmNode::getAttributeCount()’:
../../Saxon.C.API/XdmNode.cpp:205:19: error: cast from ‘jobject {aka __jobject*}’ to ‘jint {aka int}’ loses precision [-fpermissive]
   value->xdmvalue));

A workaround is to cast the lines affected to jlong first. See below:

jint result = (jlong)(proc->environ->env->CallStaticObjectMethod(xdmUtilsClass, xmID, value->xdmvalue));

A fix has been committed to subversion to the XdmNode.cpp file where we cast the value to jlong and then to jint.

Actions #1

Updated by O'Neil Delpratt about 8 years ago

  • Status changed from New to Resolved

Fix also made in the class SaxonProcessor

Actions #2

Updated by O'Neil Delpratt almost 8 years ago

  • Found in version set to 1.0.0
  • Fixed in version deleted (1.0.0)
Actions #3

Updated by O'Neil Delpratt almost 8 years ago

  • Status changed from Resolved to Closed
  • Fixed in version set to 1.0.1

Bug fix applied in the Saxon/C 1.0.1 maintenance release.

Please register to edit this issue

Also available in: Atom PDF