 |
|
|
|
|
|
|
|
Applications of static analyser Wasp
Static analyser Wasp is able to find subtle bugs in
a program after testing and debugging stages of development. So far,
we have not found a program with length more than 4000 lines in which
Wasp could not find a bug. The table below summarizes results of Wasp
application to some real programs, which was in common intensive usage:
 |
Program |
 |
Source language |
 |
Time of exploitation |
 |
Size in 1000 lines |
 |
Found errors |
 |
 |
PMOS/2 library for multitasking software, Newcastle, Australia |
 |
Modula-2 |
 |
2 years |
 |
17 |
 |
6 |
 |
 |
OBERON programming System 3, ETH Zurich, Utilities News and BookCompiler |
 |
Oberon-2 |
 |
2-3 years |
 |
23 |
 |
32 |
 |
 |
VAX command interpretor |
 |
Modula-2 |
 |
1.5 years |
 |
7 |
 |
6 |
 |
 |
IBM/360 command interpretor |
 |
Modula-2 |
 |
4 months |
 |
5 |
 |
9 |
 |
 |
Converter of headers from C to Modula-2 |
 |
Oberon-2 |
 |
6 months |
 |
11 |
 |
4 |
 |
 |
Most of the found errors are uninitialized variables. This
kind of errors may or may not cause incorrect execution
depending on the initial memory state. So missing variable
initializations are hard to find during testing and debugging
stages of program development, and are especially dangerous for
embedded software.
32 different errors, found by Wasp in two programs
from OBERON System 3, are presented by the following Wasp messages below.
Note, every bug was found in data flow connections between some
(more than one) procedures. In the first part the bugs of News program
are listed.
#################### Undefined Variables (ABSOLUTE ERRORS) #################
[EC] (e:/system3/src/TextGadgets.ob2 1167,53) variables
$new116.control,$new117.control,$new127.control not assigned
INCL(F.state0, TextGadgets0.blockadj); INCL(F$.control,nocontro...
#DEREFERENCES F^=$new116,$new117,$new127!
#DECLARATIONS $new116:(e:/system3/src/Textdocs.ob2,385,8)
$new117:(e:/system3/src/Textdocs.ob2,317,8)
$new127:(e:/system3/src/Textdocs.ob2,103,8) F:(1164,16)
#CONTEXT ! Init(1167,53) -> ShowText(e:/system3/src/Textdocs.ob2,385,16)
# ? Init(1167,53) ->
LoadTextdocument(e:/system3/src/Textdocs.ob2,103,19),
LoadLog(e:/system3/src/Textdocs.ob2,317,19)
[EC] (e:/system3/src/Documents.ob2 709,45) variables
$new116.state,$new117.state,$new127.state not assigned
IF Gadgets.lockedsize IN main$.state THEN INCL(D.state, ...
#DEREFERENCES main^=$new116,$new117,$new127!
#DECLARATIONS $new116:(e:/system3/src/Textdocs.ob2,385,8)
$new117:(e:/system3/src/Textdocs.ob2,317,8)
$new127:(e:/system3/src/Textdocs.ob2,103,8) main:(698,29)
#CONTEXT ! Init(709,45) -> ShowText(e:/system3/src/Textdocs.ob2,388,8)
# ? Init(709,45) ->
LoadLog(e:/system3/src/Textdocs.ob2,319,8),
LoadTextdocument(e:/system3/src/Textdocs.ob2,105,8)
[E] (e:/system3/src/TextGadgets0.ob2 2496,38) variable FrameY not assigned
PrintertopY := Printer.FrameY $+ Printer.FrameH; PrinterbotY := ...
[E] (e:/system3/src/win32/Viewers.ob2 218,17) variables
$new64.state,$new66.state not assigned
IF Filler$.state = 0 THEN
#DEREFERENCES Filler^=$new64,$new66!
#DECLARATIONS $new64:(e:/system3/src/win32/Oberon.ob2,326,2)
$new66:(e:/system3/src/win32/Oberon.ob2,328,2) Filler:(215,41)
[E] (e:/system3/src/win32/Kernel.ob2 1026,8) variable initialised not
assigned
$IF initialised THEN
######## NIL pointer dereference & type guard (CONDITIONAL ERRORS) #########
[C] (e:/system3/src/Texts.ob2 414,14 415,12 415,24) NIL pointer dereference
for variable T
OpenReader(675,4) ->
OpenReader(e:/system3/src/Attributes.ob2,330,8) ->
UpArrowMacro(e:/system3/src/Gadgets.ob2,913,40?)
[C] (e:/system3/src/win32/Win32.ob2 546,24) NIL pointer dereference for
variable lc.font
IF dc.hfont # lc$.font.hfont THEN
[C] (e:/system3/src/win32/Kernel.ob2 247,19) NIL pointer dereference for
variable q
BEGIN Lock(); el:=q$.link; WHILE el#q DO el.handle; el:=el.link END;
#CONTEXT HandleQ(247,19) -> Exit(642,16?) -> $body_Kernel(1027,55?)
################# Undefined Variables (CONDITIONAL ERRORS) #################
[C] (e:/system3/src/Desktops.ob2 709,52) variable $new128.X not assigned
x := M.x + F$.X; y := M.y + F.Y;...
#DEREFERENCES F^=$new128!
#DECLARATIONS $new128:(934,8) F:(699,28)
[C] (e:/system3/src/Desktops.ob2 974,63) variable $new128.state not assigned
IF Gadgets.lockedsize IN main.state THEN INCL(F$.state,
...
#DEREFERENCES F^=$new128!
#DECLARATIONS $new128:(934,8) F:(939,16)
[C] (e:/system3/src/Documents.ob2 506,46) variable M.x not assigned
x := M$.x + F.X; y := M.y + F.Y;...
#DEREFERENCES M^=M!
#DECLARATIONS M:(e:/system3/src/Desktops.ob2,1539,67) M:(497,42)
#CONTEXT Handler(506,46?) ->
LogHandler(e:/system3/src/Textdocs.ob2,295,21) ->
ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
# Handler(506,46?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
[C] (e:/system3/src/Documents.ob2 506,52) variable $new115.X not assigned
x := M.x + F$.X; y := M.y + F.Y;...
#DEREFERENCES F^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) F:(497,19)
#CONTEXT Handler(506,52?) ->
LogHandler(e:/system3/src/Textdocs.ob2,295,21) ->
ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
# Handler(506,52?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
[C] (e:/system3/src/Documents.ob2 708,22) variable $new115.state not assigned
INCL(D$.state, Gadgets.lockedcontents);
#DEREFERENCES D^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) D:(698,16)
#CONTEXT Init(708,22) ->
LoadLog(e:/system3/src/Textdocs.ob2,319,8),
LoadTextdocument(e:/system3/src/Textdocs.ob2,105,8)
[C] (e:/system3/src/win32/Viewers.ob2 58,17) variable $new144.state not
assigned
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 598,24) variable timerSet not assigned
$IF timerSet THEN
[C] (e:/system3/src/win/Objects.ob2 328,56) variable $new47.stamp not
assigned
IF M.stamp = obj$.stamp THEN M.o...
#DEREFERENCES obj^=$new47?
#DECLARATIONS $new47:(352,16) obj:(318,31)
#CONTEXT HandleDummy(328,56?) ->
CopyPublicObject(e:/system3/src/Gadgets.ob2,1495,16?) ->
LogHandler(e:/system3/src/Textdocs.ob2,271,102? 272,78? 276,102?
277,78? 281,102? 282,78?) ->
CreateMenu(e:/system3/src/Desktops.ob2,1531,8) ->
ShowDoc(e:/system3/src/Desktops.ob2,1569,34?)
# CopyPublicObject(e:/system3/src/Gadgets.ob2,1495,16?) ->
DocHandler(e:/system3/src/Textdocs.ob2,204,102? 205,78? 209,102?
210,78? 214,102? 215,78?) ->
CreateMenu(e:/system3/src/Desktops.ob2,1531,8) ->
ShowDoc(e:/system3/src/Desktops.ob2,1569,34?)
[C] (e:/system3/src/win32/Modules.ob2 503,29 504,24) variable
$new0.export.nofExp not assigned
This message is induced by the the following bug:
the second and the third parameters in the call
ret := Kernel32.GetFullPathName(S.ADR(name),LEN(fullName),S.ADR(fullName),i);
of the Check procedure was erroneously replaced.
################# Undefined Variables (WARNINGS) ###########################
[W] (e:/system3/src/Gadgets.ob2 394,92) not assigned variable M.u moved
...IL; M.loc := NIL; Display.Broadcast(M); F := M.loc; u := M$.u; v := M.v;
[W] (e:/system3/src/Texts.ob2 258,16) not assigned variable type moved
Files.Write($W, type); (*place holder*)
[W] (e:/system3/src/win32/Modules.ob2 862,16) not assigned variable
$new0.nofCmds moved
i := mod$.nofCmds;
#DEREFERENCES mod^=$new0?
#DECLARATIONS $new0:(e:/system3/src/win32/Kernel.ob2,1032,8) mod:(858,24)
Bugs of book.mes which are not mentioned in News.mes
######## NIL pointer dereference & type guard (CONDITIONAL ERRORS) #########
[C] (e:/system3/src/win32/Kernel.ob2 995,51) NIL pointer dereference for
variable $new0.code
body := S.VAL(Body, S.ADR(m$.code[0]));
#DEREFERENCES m^=$new0?
#DECLARATIONS $new0:(1032,8) m:(985,12)
################# Undefined Variables (CONDITIONAL ERRORS) #################
[C] (e:/system3/src/BookCompiler.ob2 167,16) variable expand not assigned
$IF expand THEN
#CONTEXT Expand(167,16) -> NewBook(269,24?) -> Book(1603,24?)
[C] (e:/system3/src/Books0.ob2 211,22) variable $new121.state not assigned
INCL(F$.state, Gadgets.lockedsize);
#DEREFERENCES F^=$new121!
#DECLARATIONS $new121:(210,16) F:(208,20)
[C] (e:/system3/src/Books0.ob2 398,22) variable $new126.state not assigned
INCL(F$.state, Gadgets.lockedsize);
#DEREFERENCES F^=$new126!
#DECLARATIONS $new126:(397,16) F:(395,20)
[C] (e:/system3/src/win32/Oberon.ob2 426,36) variable inTask not assigned
IF ~$inTask THEN
[C] (e:/system3/src/Texts.ob2 996,62) variable $new53.col not assigned
IF ~(W.lib IS Fonts.Font) OR (W.lib # p.lib) OR (W.col # p$.col) OR
...
#DEREFERENCES p^=$new53?
#DECLARATIONS $new53:(567,8) p:(994,8)
#CONTEXT Write(996,62?) -> WriteString(1017,23?) ->
NewBook(e:/system3/src/BookCompiler.ob2,261,24?)
# Write(996,62?) -> WriteString(1017,23?) ->
NewBook(e:/system3/src/BookCompiler.ob2,262,24? 263,24?)
# Write(996,62?) -> WriteString(1017,23?) ->
$body_Books0(e:/system3/src/Books0.ob2,560,8)
# Write(996,62?) -> WriteLn(1010,8) ->
$body_Books0(e:/system3/src/Books0.ob2,561,8)
# Write(996,62?) -> WriteLn(1010,8) ->
NewBook(e:/system3/src/BookCompiler.ob2,271,16)
[C] (e:/system3/src/win32/Modules.ob2 847,15) variable $new0.init not
assigned
ELSIF ~$m.init & import THEN C.Str("cyclic import not allowed");...
#DEREFERENCES mod^=$new0? | m^=mod!
#DECLARATIONS $new0:(e:/system3/src/win32/Kernel.ob2,1032,8) mod:(288,16)
m:(810,41)
[C] (e:/system3/src/win32/FileDir.ob2 49,22 50,27) variable name[] not
assigned on the first iteration of cycle
WHILE $name[i] # 0X DO
#DEREFERENCES name^=name!
#DECLARATIONS name:(e:/system3/src/win32/Files.ob2,222,23) name:(45,35)
#CONTEXT ConvertChar(49,22)... -> FindFile(62,16) ->
Old(e:/system3/src/win32/Files.ob2,225,49?) ->
open(e:/system3/src/Textdocs.ob2,66,22)
# Old(e:/system3/src/win32/Files.ob2,225,49?) ->
Open(e:/system3/src/Texts.ob2,384,16) ->
Compile(e:/system3/src/BookCompiler.ob2,1813,40?)
# Old(e:/system3/src/win32/Files.ob2,225,49?) ->
Open(e:/system3/src/Texts.ob2,384,16) ->
open(e:/system3/src/Textdocs.ob2,91,24?)
################# Undefined Variables (WARNINGS) ###########################
[W] (e:/system3/src/win32/Oberon.ob2 452,28) not assigned variable M.beg
moved
text := M.text; beg := M$.beg; end := M.end; time := M.time
[W] (e:/system3/src/Textdocs.ob2 102,28) not assigned variable $new97.name[]
moved
NEW(T); open(D, T, D$.name, w, h);
#DEREFERENCES D^=$new97!
#DECLARATIONS $new97:(248,6) D:(99,27)
Obviously, the number of errors, which may be derived from
Wasp message listings for News and BookCompiler programs, is likely to be
greater than 32. It is hard for us to judge whether any of the other
messages were induced by an error.
OBERON System 3 program authors of course could do it.
The Wasp message listing for News program from
OBERON System 3 is presented below. Actually, the following program
was passed through Wasp:
MODULE reply;
IMPORT News;
BEGIN News.Reply()
END reply.
Note that in the CONDITIONAL ERROR sections the density
of actual errors is very high. Usually every fourth message means
an error.
################# Unassigned Variables (ABSOLUTE ERRORS) ##################
[EC] (e:/system3/src/TextGadgets.ob2 1167,53) variables
$new116.control,$new117.control,$new127.control not assigned
INCL(F.state0, TextGadgets0.blockadj); INCL(F$.control,nocontro...
#DEREFERENCES F^=$new116,$new117,$new127!
#DECLARATIONS $new116:(e:/system3/src/Textdocs.ob2,385,8)
$new117:(e:/system3/src/Textdocs.ob2,317,8)
$new127:(e:/system3/src/Textdocs.ob2,103,8) F:(1164,16)
#CONTEXT ! Init(1167,53) -> ShowText(e:/system3/src/Textdocs.ob2,385,16)
# ? Init(1167,53) ->
LoadTextdocument(e:/system3/src/Textdocs.ob2,103,19),
LoadLog(e:/system3/src/Textdocs.ob2,317,19)
[EC] (e:/system3/src/Documents.ob2 709,45) variables
$new116.state,$new117.state,$new127.state not assigned
IF Gadgets.lockedsize IN main$.state THEN INCL(D.state, ...
#DEREFERENCES main^=$new116,$new117,$new127!
#DECLARATIONS $new116:(e:/system3/src/Textdocs.ob2,385,8)
$new117:(e:/system3/src/Textdocs.ob2,317,8)
$new127:(e:/system3/src/Textdocs.ob2,103,8) main:(698,29)
#CONTEXT ! Init(709,45) -> ShowText(e:/system3/src/Textdocs.ob2,388,8)
# ? Init(709,45) ->
LoadLog(e:/system3/src/Textdocs.ob2,319,8),
LoadTextdocument(e:/system3/src/Textdocs.ob2,105,8)
[E] (e:/system3/src/TextGadgets0.ob2 2496,38) variable FrameY not assigned
PrintertopY := Printer.FrameY $+ Printer.FrameH; PrinterbotY := ...
[E] (e:/system3/src/TextGadgets0.ob2 2496,38) variable FrameH not assigned
PrintertopY := Printer.FrameY $+ Printer.FrameH; PrinterbotY := ...
[E] (e:/system3/src/TextGadgets0.ob2 2503,51) variable FrameW not assigned
PagenoX := SHORT(LONG(PrinterleftX) + LONG($Printer.FrameW) * 19...
[E] (e:/system3/src/win32/Viewers.ob2 218,17) variables
$new64.state,$new66.state not assigned
IF Filler$.state = 0 THEN
#DEREFERENCES Filler^=$new64,$new66!
#DECLARATIONS $new64:(e:/system3/src/win32/Oberon.ob2,326,2)
$new66:(e:/system3/src/win32/Oberon.ob2,328,2) Filler:(215,41)
[E] (e:/system3/src/win32/Kernel.ob2 1026,8) variable initialised not
assigned
$IF initialised THEN
######### NIL pointer dereference & type guard (CONDITIONAL ERRORS) ########
[C] (e:/system3/src/Btrees.ob2 151,29 152,60 157,45) NIL pointer dereference
for variable pm
IF pm$.dirty THEN
#CONTEXT NewLIntPage(151,29?)... -> NewLInt(597,38)
[C] (e:/system3/src/Documents.ob2 449,16) NIL pointer dereference for
variable A.Enum
$M.Enum("DocumentName"); Gadgets.framehandle(F, M)
#DEREFERENCES M^=A!
#DECLARATIONS A:(e:/system3/src/Desktops.ob2,1539,8) M:(435,40)
[C] (e:/system3/src/Links.ob2 103,52) NIL pointer dereference for variable
a0 on the first iteration of cycle
IF list = NIL THEN list := a ELSE a0$.next := a END;
[C] (e:/system3/src/Links.ob2 201,24) NIL pointer dereference for variable
L.Enum
$M.Enum(p.name);
#DEREFERENCES M^=L!
#DECLARATIONS L:(e:/system3/src/Desktops.ob2,1523,4) M:(195,45)
[C] (e:/system3/src/Attributes.ob2 550,63) NIL pointer dereference for
variable a0 on the first iteration of cycle
IF A = NIL THEN A := a; a0 := A ELSE a0$.next :=...
[C] (e:/system3/src/Texts.ob2 414,14 415,12 415,24) NIL pointer dereference
for variable T
OpenReader(675,4) ->
OpenReader(e:/system3/src/Attributes.ob2,330,8)*recur*
[C] (e:/system3/src/Texts.ob2 414,25 414,38 414,47 418,20 418,34) NIL
pointer dereference for variable T
OpenReader(675,4) ->
OpenReader(e:/system3/src/Attributes.ob2,330,8) ->
UpArrowMacro(e:/system3/src/Gadgets.ob2,913,40?)
[C] (e:/system3/src/win/Fonts.ob2 480,27 481,25 481,49 482,25 482,49 483,24)
NIL pointer dereference for variable Default
F.height := Default$.height;
#CONTEXT Substitute(480,27)... -> Open(507,37? 513,44?) ->
ThisLibrary(e:/system3/src/win/Objects.ob2,240,32?) -> This(522,30)
-> Setdefault(535,60? 536,28?)
# Substitute(480,27)... -> Open(497,24? 509,29?) ->
ThisLibrary(e:/system3/src/win/Objects.ob2,240,32?) -> This(522,30)
-> Setdefault(535,60? 536,28?)
[C] (e:/system3/src/win32/Win32.ob2 549,24) NIL pointer dereference for
variable lc.font
IF dc.hfont # lc$.font.hfont THEN
[C] (e:/system3/src/win32/Win32.ob2 550,48 550,76) NIL pointer dereference
for variable lc.font
dmmy := SelectObject(hdcDisp, lc$.font.hfont); dc.hfont ...
[C] (e:/system3/src/win/Objects.ob2 576,46) NIL pointer dereference for
variable $new134.GName
COPY(L$.GName[m], GName[N]);
#DEREFERENCES L^=$new134!
#DECLARATIONS $new134:(e:/system3/src/Texts.ob2,322,8) L:(548,33)
[C] (e:/system3/src/win32/Threads.ob2 346,24) NIL pointer dereference for
variable trapHandler
$Kernel.trapHandler(t.trapInfo);
[C] (e:/system3/src/win32/Kernel.ob2 247,19) NIL pointer dereference for
variable q
BEGIN Lock(); el:=q$.link; WHILE el#q DO el.handle; el:=el.link END;
#CONTEXT HandleQ(247,19) -> Exit(642,16?) -> $body_Kernel(1027,55?)
[C] (e:/system3/src/win32/Kernel.ob2 995,51) NIL pointer dereference for
variable $new0.code
body := S.VAL(Body, S.ADR(m$.code[0]));
#DEREFERENCES m^=$new0?
#DECLARATIONS $new0:(1032,8) m:(985,12)
################ Unassigned Variables (CONDITIONAL ERRORS) ################
[C] (e:/system3/src/Desktops.ob2 709,52) variable $new128.X not assigned
x := M.x + F$.X; y := M.y +
F.Y;...
#DEREFERENCES F^=$new128!
#DECLARATIONS $new128:(934,8) F:(699,28)
[C] (e:/system3/src/Desktops.ob2 709,68) variable $new128.Y not assigned
x := M.x + F.X; y := M.y +
F$.Y;...
#DEREFERENCES F^=$new128!
#DECLARATIONS $new128:(934,8) F:(699,28)
[C] (e:/system3/src/Desktops.ob2 973,34) variable $new115.X not assigned
A.dX := A.X - main$.X; A.dY := A.Y - main.Y; A.dW :=
A.W...
#DEREFERENCES main^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) main:(939,36)
[C] (e:/system3/src/Desktops.ob2 974,63) variable $new128.state not assigned
IF Gadgets.lockedsize IN main.state THEN INCL(F$.state,
...
#DEREFERENCES F^=$new128!
#DECLARATIONS $new128:(934,8) F:(939,16)
[C] (e:/system3/src/Documents.ob2 506,46) variable M.x not assigned
x := M$.x + F.X; y := M.y +
F.Y;...
#DEREFERENCES M^=M!
#DECLARATIONS M:(e:/system3/src/Desktops.ob2,1539,67) M:(497,42)
#CONTEXT Handler(506,46?) ->
LogHandler(e:/system3/src/Textdocs.ob2,295,21) ->
ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
# Handler(506,46?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
[C] (e:/system3/src/Documents.ob2 506,52) variable $new115.X not assigned
x := M.x + F$.X; y := M.y +
F.Y;...
#DEREFERENCES F^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) F:(497,19)
#CONTEXT Handler(506,52?) ->
LogHandler(e:/system3/src/Textdocs.ob2,295,21) ->
Init(e:/system3/src/Desktops.ob2,975,16)
# Handler(506,52?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> Init(e:/system3/src/Desktops.ob2,975,16)
# Handler(506,52?) -> LogHandler(e:/system3/src/Textdocs.ob2,295,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
# Handler(506,52?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
[C] (e:/system3/src/Documents.ob2 506,62) variable M.y not assigned
x := M.x + F.X; y := M$.y +
F.Y;...
#DEREFERENCES M^=M!
#DECLARATIONS M:(e:/system3/src/Desktops.ob2,1539,67) M:(497,42)
#CONTEXT Handler(506,62?) ->
LogHandler(e:/system3/src/Textdocs.ob2,295,21) ->
ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
# Handler(506,62?) -> DocHandler(e:/system3/src/Textdocs.ob2,233,21)
-> ShowDoc(e:/system3/src/Desktops.ob2,1566,24?)
[C] (e:/system3/src/Documents.ob2 708,22) variable $new115.state not assigned
INCL(D$.state, Gadgets.lockedcontents);
#DEREFERENCES D^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) D:(698,16)
#CONTEXT Init(708,22) ->
LoadLog(e:/system3/src/Textdocs.ob2,319,8),
LoadTextdocument(e:/system3/src/Textdocs.ob2,105,8)
[C] (e:/system3/src/Gadgets.ob2 981,27) variable A.s[] not assigned
IF $M.s[0] # 0X THEN (* Insert name *)
#DEREFERENCES M^=A!
#DECLARATIONS A:(e:/system3/src/Desktops.ob2,1539,8) M:(952,46)
[C] (e:/system3/src/win32/Oberon.ob2 426,36) variable inTask not assigned
IF ~$inTask THEN
[C] (e:/system3/src/win32/Viewers.ob2 58,17) variable $new144.state not
assigned
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 533,28) variable dc.y not assigned
IF (dc.x # x) OR (dc$.y # y) OR (dc.w # w) OR (dc.h # h) THEN
#CONTEXT SetClippingArea(533,28?) ->
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 533,42) variable dc.w not assigned
IF (dc.x # x) OR (dc.y # y) OR (dc$.w # w) OR (dc.h # h) THEN
#CONTEXT SetClippingArea(533,42?) ->
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 533,56) variable dc.h not assigned
IF (dc.x # x) OR (dc.y # y) OR (dc.w # w) OR (dc$.h # h) THEN
#CONTEXT SetClippingArea(533,56?) ->
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 534,21) variable lc.len not assigned
IF lc$.len > 0 THEN FlushCache END;
#CONTEXT SetClippingArea(534,21?) ->
ReplConst(e:/system3/src/win/Display.ob2,385,8?) ->
OpenDisplay(e:/system3/src/win32/Oberon.ob2,325,2)
[C] (e:/system3/src/win32/Win32.ob2 553,15) variable lc.mode not assigned
CASE lc$.mode OF
[C] (e:/system3/src/win32/Win32.ob2 556,48) variable lc.y0 not assigned
TextOut(hdcDisp, lc.x0, DispH-lc$.y0, S.ADR(lc.cache),l...
[C] (e:/system3/src/win32/Win32.ob2 601,24) variable timerSet not assigned
$IF timerSet THEN
[C] (e:/system3/src/win32/Modules.ob2 503,29 504,24) variable
$new0.export.nofExp not assigned
CheckName(455,32?)
[C] (e:/system3/src/win32/FileDir.ob2 78,27) variable fullName[] not assigned
IF $fullName[i] = WinPathChar THEN
#DEREFERENCES fullName^=fullName!
#DECLARATIONS fullName:(445,24) fullName:(73,32)
##################### Unassigned Variables (WARNINGS) #####################
[W] (e:/system3/src/Desktops.ob2 1563,32) not assigned variable $new115.X
moved
M.X := D$.X; M.Y := D.Y; M.W := recDocwidth;
M.H...
#DEREFERENCES D^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) D:(1537,19)
[W] (e:/system3/src/Btrees.ob2 132,44) not assigned variable $new98'.e[].key
moved
Files.WriteLInt(R, p$.e[i].key);
#DEREFERENCES p^=$new98'?
#DECLARATIONS $new98':(145,16) p:(120,41)
#CONTEXT WriteLIntPage(132,44?) -> NewLIntPage(152,32?) ->
ReadLIntPage(182,40?) -> MinLIntKey(548,16)
[W] (e:/system3/src/Documents.ob2 445,62) not assigned variable A.s[] moved
IF M.class = Objects.String THEN COPY($M.s,
F.na...
#DEREFERENCES M^=A!
#DECLARATIONS A:(e:/system3/src/Desktops.ob2,1539,8) M:(435,40)
[W] (e:/system3/src/Documents.ob2 706,35) not assigned variable $new115.X
moved
main.X := D$.X; main.Y := D.Y; main.W := D.W;
ma...
#DEREFERENCES D^=$new115!
#DECLARATIONS $new115:(e:/system3/src/Textdocs.ob2,384,8) D:(698,16)
........ and so on ... further 17 messages
########################## Scalar Errors (WARNINGS) ########################
[W] (e:/System3/Src/Win32/NetSystem.ob2 307,31) range 0:255 overflow on
value 48:21474884
num[j] $:= CHR(ORD("0")+d); INC(j)
[W] (e:/System3/Src/Win32/Oberon.ob2 352,15) zero or negative divisor 0, 78, 80
BEGIN RETURN X $DIV DW * DW
[W] (e:/System3/Src/Win/Objects.ob2 339,82) range 1:65535 underflow on value
0, 2
... obj.len := M.len; NEW(obj.blk, obj$.len);
#CONTEXT HandleDummy(339,82?) -> OldLoadLibrary(486,40?) ->
LoadLibrary(543,24?) -> LoadFileLib(642,48?) -> ThisLibrary(240,32?)
-> This(e:/System3/Src/Win/Fonts.ob2,522,30) ->
Setdefault(e:/System3/Src/Win/Fonts.ob2,535,60? 536,28?)
############################ UNREACHABLE BRANCHES ##########################
[W] (reply.ob2 2,7) procedure $body_reply has no exit
MODULE $reply;
[W] (e:/system3/src/News.ob2 1692,24) unreachable THEN-branch
$Texts.OpenReader(R, text, beg);
[W] (e:/system3/src/Mail.ob2 3021,31) body of WHILE never executed
WHILE snoopers $# NIL DO
[W] (e:/system3/src/HyperDocs.ob2 1574,16) unreachable ELSE-branch
$IF F = NIL THEN
[W] (e:/system3/src/HyperDocs.ob2 1576,46) operand in OR/AND operator = FALSE
IF (V # NIL) & (V.dsc $# NIL) THEN
[W] (e:/system3/src/Textdocs.ob2 188,24) unreachable THEN-branch
$WITH M: Objects.AttrMsg DO
#CONTEXT DocHandler(188,24!?) ->
Restore(e:/system3/src/Desktops.ob2,156,26),
ShowDoc(e:/system3/src/Desktops.ob2,1566,24?),
CreateMenu(e:/system3/src/Desktops.ob2,1531,8)
# DocHandler(188,24!?) ->
ModifyFrame(e:/system3/src/Desktops.ob2,133,16? 138,16?) ->
Restore(e:/system3/src/Desktops.ob2,159,6?)
# DocHandler(188,24!?) -> Init(e:/system3/src/Desktops.ob2,975,16)
# DocHandler(188,24!?) ->
ModifyFrame(e:/system3/src/Desktops.ob2,144,8) ->
Restore(e:/system3/src/Desktops.ob2,159,6?)
[W] (e:/system3/src/Textdocs.ob2 288,22) unreachable ELSE-branch
ELSIF $M IS Display.DisplayMsg THEN
#CONTEXT LogHandler(288,22) ->
CreateMenu(e:/system3/src/Desktops.ob2,1531,8)
[W] (e:/system3/src/win32/NetSystem.ob2 177,40) unreachable THEN-branch
$IF C.sock # InvalidSocket THEN
[W] (e:/system3/src/Desktops.ob2 708,40) operand in OR/AND operator = trUE
IF (M.F $= NIL) OR (M.F = F) THEN ...
[W] (e:/system3/src/Desktops.ob2 942,27) unreachable THEN-branch
IF menu = NIL THEN $HALT(99) END;
[W] (e:/system3/src/Desktops.ob2 1040,10) procedure newMenu has no exit
PROCEDURE $newMenu(name, menubar: ARRAY OF CHAR): Display.Frame;
[W] (e:/system3/src/Desktops.ob2 1117,10) procedure NewMenu has no exit
PROCEDURE $NewMenu*(menubar: ARRAY OF CHAR): Display.Frame;
[W] (e:/system3/src/Desktops.ob2 1513,24) body of WHILE never executed
WHILE f $# NIL DO
[W] (e:/system3/src/Desktops.ob2 1592,26) operand in OR/AND operator = FALSE
IF (D.lib $# NIL) & (D.lib.name # "") THEN (* uh-uh,pub...
[W] (e:/system3/src/TextGadgets.ob2 1128,24) unreachable THEN-branch
$WITH M: Display.ModifyMsg DO
#CONTEXT FrameHandler(1128,24) ->
Restore(e:/system3/src/Desktops.ob2,156,4)
[W] (e:/system3/src/TextGadgets.ob2 1129,40) operand in OR/AND operator =
trUE
IF (M.F $# NIL) & (M.F IS Style) THEN
#CONTEXT FrameHandler(1129,40) -> Init(e:/system3/src/Desktops.ob2,962,8
967,8)
# FrameHandler(1129,40) ->
ModifyFrame(e:/system3/src/Desktops.ob2,133,16? 138,16? 144,8) ->
Restore(e:/system3/src/Desktops.ob2,158,6? 160,9?)
[W] (e:/system3/src/TextGadgets.ob2 1135,22) unreachable ELSE-branch
ELSIF $M IS Display.ControlMsg THEN
#CONTEXT FrameHandler(1135,22) -> Init(e:/system3/src/Desktops.ob2,962,8
967,8)
# FrameHandler(1135,22) ->
ModifyFrame(e:/system3/src/Desktops.ob2,133,16? 138,16? 144,8) ->
Restore(e:/system3/src/Desktops.ob2,158,6? 160,9?)
[W] (e:/system3/src/TextGadgets.ob2 1159,24) unreachable ELSE-branch
$TextGadgets0.FrameHandler(F, M)
#CONTEXT FrameHandler(1159,24) ->
Restore(e:/system3/src/Desktops.ob2,156,4)
[W] (e:/System3/Src/Btrees.ob2 131,16) low value 0 > high value -1 in FOR
$FOR i := 0 TO p.m-1 DO
[W] (e:/system3/src/Btrees.ob2 148,33) body of WHILE never executed
WHILE p0 $# NIL DO
#CONTEXT NewLIntPage(148,33?) -> NewLInt(597,38)
[W] (e:/system3/src/Btrees.ob2 155,40) unreachable THEN-branch
pp.next $:= pm.next
#CONTEXT NewLIntPage(155,40?) -> NewLInt(597,38)
[W] (e:/system3/src/Btrees.ob2 196,35) operand in OR/AND operator = trUE
IF (p.next $= NIL) & (p # T.cache) THEN
#CONTEXT ReadLIntPage(196,35?) -> MinLIntKey(548,16)
[W] (e:/system3/src/Btrees.ob2 632,33) body of WHILE never executed
WHILE p0 $# NIL DO
[W] (e:/system3/src/Btrees.ob2 639,40) unreachable THEN-branch
pp.next $:= pm.next
[W] (e:/system3/src/Documents.ob2 633,48) unreachable THEN-branch
ELSIF M IS Objects.AttrMsg THEN $DocumentAttr(F,
M(Objec...
#CONTEXT Handler(633,48) ->
LogHandler(e:/system3/src/Textdocs.ob2,285,37?) ->
CreateMenu(e:/system3/src/Desktops.ob2,1531,8)
# Handler(633,48) -> DocHandler(e:/system3/src/Textdocs.ob2,218,37?)
-> CreateMenu(e:/system3/src/Desktops.ob2,1531,8)
........ and so on ... further ~50 messages
######################## UNUSABLE VARIABLES (Strong) #######################
[W] (e:/system3/src/News.ob2 86,26) variable newgDate.day assigned but not
used
i $:= SHORT(S.i);
#DEREFERENCES i^=newgDate.day!
#DECLARATIONS newgDate:(73,16) i:(83,52)
#CONTEXT ScanInt(86,26?) -> ScanDate(95,16)
[W] (e:/system3/src/Mail.ob2 3105,24) variable $new104.Display assigned but
not used
mailListMethod^ $:= ListGadgets.method^;
#DEREFERENCES mailListMethod^=$new104!
#DECLARATIONS $new104:(3104,8) mailListMethod:(124,16)
[W] (e:/system3/src/HyperDocs.ob2 1590,31) variable diskCache assigned but
not used
curKey := 0; diskCache $:= Files.New("");
[W] (e:/system3/src/HyperDocs.ob2 1595,21) variable $new100.LocateString
assigned but not used
linkMethods^ $:= TextGadgets.methods^;
#DEREFERENCES linkMethods^=$new100!
#DECLARATIONS $new100:(1594,8) linkMethods:(123,16)
[W] (e:/system3/src/win32/NetSystem.ob2 1387,37) variable sockDll assigned
but not used
Texts.OpenWriter(W); sockDll $:= Kernel32.NULL;
[W] (e:/system3/src/Btrees.ob2 1100,19) variable tag assigned but not used
tag$:=0;--vshel Files.ReadInt(R, tag); ASSERT(tag =
Tag)...
[W] (e:/system3/src/Attributes.ob2 487,40) formal parameter T not used
PROCEDURE *StandardMacros(ch: CHAR; VAR $T: Reader; VAR res:
Texts.Text;...
[W] (e:/system3/src/win32/Oberon.ob2 452,38) variable end assigned but not
used
text := M.text; beg := M.beg; end $:= M.end; time := M.time
#DEREFERENCES end^=end!
#DECLARATIONS end:(e:/system3/src/Attributes.ob2,488,26) end:(448,56)
#CONTEXT GetSelection(452,38) ->
StandardMacros(e:/system3/src/Attributes.ob2,494,24?)
[W] (e:/system3/src/win/Fonts.ob2 306,81) formal parameter class not used
...amily: ARRAY OF CHAR; size: LONGINT; style: SET; $class: ARRAY OF
CHAR);
......... and so on ... further ~300 messages about unusable variables
|