Page 1 of 1

Multipe warnings

Posted: Fri Aug 18, 2017 1:28 pm
by Moisha
Hi.

Just upgraded v5 to v6.
Got multiple warnings during compile.
Some of them (i.e. Implicit string cast from 'AnsiChar' to 'string') are just copiler paranoia but the others make me a little nervous.

[dcc32 Warning] XLSZip5.pas(269): W1035 Return value of function 'TXLSZipArchive.AddFolderChain' might be undefined
[dcc32 Warning] XLSEncodeFmla5.pas(364): W1036 Variable 'Special' might not have been initialized
[dcc32 Warning] XLSCalcChain5.pas(666): W1036 Variable 'L' might not have been initialized
[dcc32 Warning] XLSReadRTF.pas(2756): W1057 Implicit string cast from 'AnsiChar' to 'string'
[dcc32 Warning] XLSSynLZ.pas(1168): W1036 Variable 't' might not have been initialized

Regards

Re: Multipe warnings

Posted: Sun Aug 20, 2017 8:27 pm
by larsa
Hello

I don't get any of those warnings when I compile with the latest Delphi version.

Re: Multipe warnings

Posted: Mon Aug 21, 2017 4:55 am
by Moisha
Hi.
We use Delphi XE4 Update 1, it's the only update for XE4.
Find in source code commented lines marked "make compiler happy".
Uncommenting did the trick, no warnings now.
Regards.

Re: Multipe warnings

Posted: Thu Aug 31, 2017 7:17 am
by d3nton
Hello.

I have similare problems, too.
Using Delphi 10.2 Tokyo + XLSReadWrite 6.0.0.16:

64bit compiler hints/warnings:
[dcc64 Warning] xpgParseDrawing.pas(1965): W1036 Variable 'opcDrw' might not have been initialized
[dcc64 Hint] XLSMath5.pas(4199): H2164 Variable 'zb' is declared but never used in 'FindInverseGamma'
[dcc64 Warning] XLSSynCommons.pas(16157): W1073 Combining signed type and unsigned 64-bit type - treated as an unsigned type
[dcc64 Warning] XLSSynCommons.pas(45565): W1073 Combining signed type and unsigned 64-bit type - treated as an unsigned type
[dcc64 Warning] XLSSynCommons.pas(45566): W1073 Combining signed type and unsigned 64-bit type - treated as an unsigned type

32bit compiler warnings:
[dcc32 Warning] xpgParseDrawing.pas(1965): W1036 Variable 'opcDrw' might not have been initialized

According to our developer guidlines compiler warnings and/or hints during compilation have to be fixed, so each time I update XLSReadWrite I have to fix this manually.
It would be nice if you could fix it in the next update.

Regards.