#355 Win64 portability warnings

Test Required
closed-fixed
Karl Waclawek
None
5
2006-01-13
2005-01-19
Henrik Goldman
No

I am trying to get my software ready for Win64
(AMD64 / IA64). Currently I'm using Visual Studio .NET
2003 with /Wp64 switch enabled. However theres some
missing typecasts in expat to make it compile clean.

Instead of waiting for someone to fix it I can probably do
it myself but I'm only willing to if my changes will be
considered for next release. I'm rather sure all the
warnings will go away with apropriate typecasts. Please
advise me how to continue.

I'm using the downloaded version of expat 1.95.8:

c:\myprog\shared\libs\expat-1.95.8\lib\xmltok_impl.c
(1717) : warning C4244:
'return' : conversion from '__w64 int' to 'int', possible
loss of data
c:\myprog\shared\libs\expat-1.95.8\lib\xmltok_impl.c
(1717) : warning C4244:
'return' : conversion from '__w64 int' to 'int', possible
loss of data
c:\myprog\shared\libs\expat-1.95.8\lib\xmltok_impl.c
(1717) : warning C4244:
'return' : conversion from '__w64 int' to 'int', possible
loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1604) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1606) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1615) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1628) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1642) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1761) :
warning C4244: 'return' :
conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1770) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(1771) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2318) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2323) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2511) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2516) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2541) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(2550) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(3067) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(3076) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(3938) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(4623) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(4669) :
warning C4244: '=' : conve
rsion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(5130) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(5135) :
warning C4244: 'function'
: conversion from '__w64 int' to 'int', possible loss of data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(6017) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data
../../shared\libs\expat-1.95.8\lib\xmlparse.c(6031) :
warning C4244: 'initializi
ng' : conversion from '__w64 int' to 'int', possible loss of
data

Discussion

  • Logged In: YES
    user_id=3066

    We'll certainly consider patches. The best way to proceed
    would be to attach a patch to this bug report.

     
  • Henrik Goldman
    Henrik Goldman
    2005-01-30

    Logged In: YES
    user_id=798004

    Ok, so I patched my local 1.95.8 distribution and created a
    diff file. All the patches I made, are __int64 to int typecast
    warnings. All of them were fixed by adding parentheses and
    adding a (int) typecast.

     
  • Henrik Goldman
    Henrik Goldman
    2005-01-30

    Microsoft Visual C++ 14.00.xx AMD64 patch

     
    Attachments
  • Henrik Goldman
    Henrik Goldman
    2005-02-07

    Logged In: YES
    user_id=798004

    So did anyone look at the patch?

     
  • Henrik Goldman
    Henrik Goldman
    2005-03-27

    Logged In: YES
    user_id=798004

    I don't understand why anyone hasn't looked at the patches
    yet? Sooner or later you will get more of these Win64 x64
    requests because it's soon to be released as final and then
    people will want to write software for it.

    The patches I submitted are quite trivial which you will see
    when looking through them.

    Thanks.

     
  • Karl Waclawek
    Karl Waclawek
    2005-11-27

    • assigned_to: nobody --> kwaclaw
     
  • Karl Waclawek
    Karl Waclawek
    2005-11-27

    Logged In: YES
    user_id=290026

    It seems this patch should work on other platforms as well.
    I'll have a look at this together with issue # 1284386.

    Karl

     
  • Karl Waclawek
    Karl Waclawek
    2005-11-28

    Logged In: YES
    user_id=290026

    Applied the type casts in xmlparse.c rev. 1.150 and
    xmltok_impl.c rev. 1.11.

     
  • Karl Waclawek
    Karl Waclawek
    2005-11-28

    • milestone: 103319 --> Test Required
    • status: open --> open-fixed
     
  • Karl Waclawek
    Karl Waclawek
    2006-01-13

    Logged In: YES
    user_id=290026

    No issues reported.
    Closing this bug.

     
  • Karl Waclawek
    Karl Waclawek
    2006-01-13

    • status: open-fixed --> closed-fixed