Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-devel / 2018-09

How to suppress warnings in code?

4 messages · 2 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Martin Schreiber

Hi,
How can individual warnings be suppressed in code in Free Pascal fixes_3_2? {$warn <n> off} seems not to work reliable in some projects if compiled with -B.

Thanks, Martin

Reply by email

Sven Barth
to Martin Schreiber

Martin Schreiber schrieb am Mi., 26. Sep. 2018, 17:14:

Show quoted text 5 lines
Hi, How can individual warnings be suppressed in code in Free Pascal fixes_3_2? {$warn <n> off} seems not to work reliable in some projects if compiled with -B.

Please provide concrete examples.

Regards,
Sven

Reply by email

Martin Schreiber
to Sven Barth
Sven Barth wrote
Please provide concrete examples.

Here:
https://gitlab.com/mseide-msegui/mseide-msegui/tree/fpc_3_2

On Linux-X86-64 in clone directory compile with
"
<your fixes_3_2 FPC> -O- -Fulib/common/* -Fulib/common/kernel/linux apps/ide/mseide.pas
",
repeat until only "apps/ide/mseide.pas" will be compiled.

Touch "lib/common/kernel/mseformatstr.pas", compile again, "mseformatstr.pas" will be compiled without warnings.

Compile with
"
<your fixes_3_2 FPC> -B -O- -Fulib/common/* -Fulib/common/kernel/linux apps/ide/mseide.pas
"
"mseformatstr.pas" will be compiled with warnings.

BTW, compiletimes (s):

run 2 3 4
FPC fixes_2_6 39.6 37.8 38.6
FPC fixes_3_0 53.9 53.3 53.8
FPC fixes_3_2 64.6 68.1 65.3

OpenSUSE LEAP 42.3
4 x Intel(R) Pentium(R) CPU J2900 @ 2.41GHz, 3.8 GiB RAM

Martin

Reply by email