Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1

TOPIC:

Compiler switches 22 Sep 2022 17:12 #23974

  • Horst
  • Horst's Avatar
  • Topic Author


  • Posts: 283
  • Hallo
    I compiled my project with the new 2.13 and now i have many warnings
    warning XS9021: Conversion from 'dword' to 'int' may lead to loss of data or overflow errors	482,13	Pdf Klasse.prg	MDPDF:_getstringwidth
    i know i shoud clean up this prg's , but i did not wrote it and it will need a lot of time and they worked for years now.

    in the attachements a picture of my compiler switches

    Horst
    Attachments:

    Please Log in or Create an account to join the conversation.

    Compiler switches 22 Sep 2022 17:16 #23975

    • Chris
    • Chris's Avatar


  • Posts: 3667
  • Hi Horst,

    If you just want to hide those warnings, you can just add its number (9021) in the list of already disabled warnings in the top of the screenshot you posted.

    But of course it's better when you get some time, to resolve the warnings by modifying the code, since most warnings are probably harmless (the potential numeric overflow never happens in practice), but a few of them might be also revealing true existing problems in your app, which might be hidden till now.
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Compiler switches 22 Sep 2022 17:57 #23977

    • Horst
    • Horst's Avatar
    • Topic Author


  • Posts: 283
  • Hello Chris

    The warnings did not come before X# 2.10 , i am scared some switches is not working anymore.

    Because this was not working
    fTmp is a float ,gdMwst is dword - the result shoud be 7.7 but was 8
    fTmp :=  SELF:gdMwst1/100

    i had to change to
    fTmp :=  SELF:gdMwst1/100.0
    Wolfgang told me that or setting a switch months ago - and /vo12 was set on

    Horst

    Please Log in or Create an account to join the conversation.

    Compiler switches 22 Sep 2022 18:07 #23978

    • Chris
    • Chris's Avatar


  • Posts: 3667
  • Hi Horst,

    No, it was just a bug before that those warnings were incorrectly not being reported and were hidden by accident, now they do get reported, so you are aware of potential such problems in the code. The same warnings are being reported (unless explicitly disabled) also in VO, for the same code.

    About the division problem, I'm not seeing it here, when /vo12 is on, then I do get 7.7 as a result. CAn you show a complete sample reproducing the problem?
    XSharp Development Team
    chris(at)xsharp.eu

    Please Log in or Create an account to join the conversation.

    Compiler switches 23 Sep 2022 08:06 #23990

    • Horst
    • Horst's Avatar
    • Topic Author


  • Posts: 283
  • Hello Chris
    I can not reproduce the error with x# 2.13. So i went back to the x# version before. Now i can say x# 2.13 works good and it was my version 2.10 before that make the error with the devision.

    i dont like warnings :-) so i will spend time to fix all this int - dword warnings.

    Thanks
    Horst

    Please Log in or Create an account to join the conversation.

    • Page:
    • 1