Hello fredvs,
you wrote on Fri, 27 Mar 2020 15:04:49 -0700 (MST):
> With last fpc 3.3.1 trunk, there are warnings in case like this:
>
> procedure test;
> var
> b: 1..10;
> begin
> case b of // here warning
> 1: writeln('hello');
> end
> end;
>
> " Warning: (6060) Case statement does not handle all possible cases."
>
> In MSEgui there is lot of code that is similar and generate that warning.
>
> I propose to simply disable that warning with {$warn 6060 off} and not
> touch at rest of code.
I propose to add a - possibly empty, but AT LEAST commented! - default
(else) clause.
NOT handling some of the possible cases _might_ produce "interesting"
effects, so it should be considered to at least contemplate the possible
behaviour, maybe even add corresponding code raising an exception or
providing an error message - sometimes, an innocent looking modification
someplace else can trigger such an unhandled case and produce a rather
obscure failure.
"Sometimes" warnings _do_ have a serious reason!
--
--
(Weitergabe von Adressdaten, Telefonnummern u.ä. ohne Zustimmung
nicht gestattet, ebenso Zusendung von Werbung oder ähnlichem)
-----------------------------------------------------------
Mit freundlichen Grüßen, S. Schicktanz
-----------------------------------------------------------
_______________________________________________
mseide-msegui-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mseide-msegui-talk