You are not logged in.
I'm getting a bunch of compilation warnings inside SynCommons with Delphi 2010 and the latest nightly build (happened in older builds too). The most problematic warning happens during ANSICHARNOT01310 assignment: [DCC Warning] SynCommons.pas(13183): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information.
Consequently ExistsIniName function goes into an endless loop while trying to check for "ORIGIN:" inside HTTP request header. The problem is actually inside GetNextLineBegin which stops advancing through request header once is hits 'z' because ANSICHARNOT01310 is defined as [#1..#9,#11..#12,#14..'y'].
This only happens when I clear all DCU files from the project and compile for the first time. However if I change anything inside SynCommons, which will recompile it again, it starting working perfectly and ANSICHARNOT01310 is now defined correctly as [#1..#9,#11..#12,#14..'˙'].
Any idea how to fix this without compiling twice?
Thanks!
Offline
Yes, I just downloaded the latest build (1.18.3878) and it shows the same warnings ...
[DCC Warning] SynLZ.pas(1348): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(13219): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(21714): W1062 Narrowing given wide string constant lost information
[DCC Warning] SynCommons.pas(36704): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(51643): W1061 Narrowing given WideChar constant (#$0080) to AnsiChar lost information
[DCC Warning] SynCommons.pas(53756): W1061 Narrowing given WideChar constant (#$00C8) to AnsiChar lost information
[DCC Warning] SynCommons.pas(54234): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(54237): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(59524): W1061 Narrowing given WideChar constant (#$00FE) to AnsiChar lost information
[DCC Warning] SynCommons.pas(59532): W1061 Narrowing given WideChar constant (#$00FF) to AnsiChar lost information
[DCC Warning] SynCommons.pas(66206): W1061 Narrowing given WideChar constant (#$0080) to AnsiChar lost information
[DCC Warning] mORMot.pas(25600): W1062 Narrowing given wide string constant lost information
[DCC Warning] mORMot.pas(25600): W1062 Narrowing given wide string constant lost information
Offline
The warnings disappear when I change something (like a blank space) in SynCommons and compile again. It works perfectly after that.
Seems like SynCommons depends on a precompiled unit which isn't there when the whole Synopse gets compiled for the first time. I'm not that familiar with the inner-workings of Delphi so I could be completely wrong.
However, I have tried to do that a couple of times today and it's always the same result:
- Clear all DCUs from project
- Compile whole project
- Run
- Test - doesn't work because it goes into an endless loop inside ExistsIniName
- Change a white space in SynCommons
- Compile again
- Run
- Test - works perfectly
Offline