Changeset 21424


Ignore:
Timestamp:
01/06/10 00:19:06 (11 years ago)
Author:
davidb
Message:

When testing on a 64-bit architecture, compile failed with error: cast from 'unsigned char*' to 'int' loses precision. Code seems to be doing a distance calculation between pointers in memory. Have changed these typecasts to (long)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/runtime-src/src/oaiservr/oaiargs.cpp

    r10336 r21424  
    5151    text_t label, value;
    5252    if (equals == NULL) {
    53       label.setcarr((char *) start, (int) here - (int) start);
     53      label.setcarr((char *) start, (long) here - (long) start);
    5454      value = label;
    5555    }
    5656    else {
    57       label.setcarr((char *) start, (int) equals - (int) start);
     57      label.setcarr((char *) start, (long) equals - (long) start);
    5858      ++equals;
    59       value.setcarr((char *) equals, (int) here - (int) equals);
     59      value.setcarr((char *) equals, (long) here - (long) equals);
    6060    }
    6161
Note: See TracChangeset for help on using the changeset viewer.