Fix stc compiler warnings
authorStefan Vogel <sv@exept.de>
Wed, 05 Jun 2013 15:23:47 +0200
changeset 4233 06183a48f783
parent 4232 8193baee0399
child 4234 63f563c5aca9
Fix stc compiler warnings (as well some bugs detected by the warnings)
ImageEditView.st
--- a/ImageEditView.st	Tue Jun 04 15:52:09 2013 +0200
+++ b/ImageEditView.st	Wed Jun 05 15:23:47 2013 +0200
@@ -483,8 +483,7 @@
 redrawImageX:x y:y width:w height:h unmaskedOnly:unmaskedOnly
     "redraw the magnified (editing) view of the image"
 
-    |ih iw magX magY minX maxX minY maxY 
-     color lastColor lastY runW x0 xI yI maskColor mask
+    |ih iw magX magY minX maxX minY maxY lastColor lastY runW x0 maskColor mask
      sizeOfMaskPoint useNearestColor origin|
 
     useNearestColor := device visualType == #PseudoColor.
@@ -583,7 +582,7 @@
 
 redrawX:x y:y width:w height:h
 
-    |ih iw xI yI devImage imgWidth imgHeight|
+    |xI yI devImage imgWidth imgHeight|
 
     image isNil ifTrue:[^self].
 
@@ -606,20 +605,20 @@
 
     self redrawImageX:x y:y width:w height:h.
 
+    imgWidth := image width.
+    imgHeight := image height.
+
     "/ beyond of image ?
     adjust == #center ifTrue:
     [
-        xI := (width - ih) // 2 - margin.
-        yI := (height - iw) // 2 - margin.
+        xI := (width - imgWidth) // 2 - margin.
+        yI := (height - imgHeight) // 2 - margin.
     ]
     ifFalse:
     [
         xI := yI := margin
     ].
 
-    imgWidth := image width.
-    imgHeight := image height.
-
     (x + w - 1) > (xI + (magnification x * imgWidth)) ifTrue:
     [
         self clearRectangleX:(xI + (magnification x * imgWidth))
@@ -951,7 +950,7 @@
 
 cropLeft:doLeft right:doRight top:doTop bottom:doBottom
     |yMinNew yMaxNew xMinNew xMaxNew
-     pix stillCrobbing xMax yMax x y|
+     pix stillCrobbing xMax yMax|
 
     xMax := image width - 1.
     yMax := image height - 1.
@@ -1083,7 +1082,7 @@
 filledBoxAt: aPoint
     "fill a rectangular area with the currently selected color"
 
-    |choosenBox imageBox clr pix maskVal|
+    |choosenBox imageBox clr pix|
 
     (clr := self selectedColor) notNil ifTrue:[
         choosenBox := self dragRectangleStartingAt: aPoint emphasis: #filledBox.
@@ -2777,11 +2776,11 @@
 !ImageEditView class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.254 2013-06-04 10:31:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.255 2013-06-05 13:23:47 stefan Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.254 2013-06-04 10:31:05 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libwidg2/ImageEditView.st,v 1.255 2013-06-05 13:23:47 stefan Exp $'
 ! !