fix new warnings from gcc 4.2
authorreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 14 Oct 2009 09:36:25 +0000 (09:36 +0000)
committerreed@android.com <reed@android.com@2bbb7eff-a529-9590-31e7-b0007b416f81>
Wed, 14 Oct 2009 09:36:25 +0000 (09:36 +0000)
git-svn-id: http://skia.googlecode.com/svn/trunk@384 2bbb7eff-a529-9590-31e7-b0007b416f81

src/animator/SkScriptTokenizer.cpp
src/core/SkGraphics.cpp
src/core/SkMemory_stdlib.cpp
src/core/SkScan_Path.cpp
src/utils/mac/SkOSWindow_Mac.cpp

index d75e68e..6be2abd 100644 (file)
@@ -219,7 +219,7 @@ int SkScriptEngine2::arithmeticOp(char ch, char nextChar, bool lastPush) {
             // !!! ignoring unary plus as implemented here has the side effect of
             // suppressing errors like +"hi"
             if (lastPush == false)    // unary plus, don't push an operator
-                goto returnAdv;
+                return advance;
             op = kAdd;
             break;
         case '-':
@@ -278,7 +278,7 @@ twoChar:
             break;
         case '(':
             *fOpStack.push() = (Op) kParen;
-            goto returnAdv;
+            return advance;
         case '&':
             SkASSERT(nextChar != '&');
             op = kBitAnd;
@@ -319,8 +319,8 @@ twoChar:
     fOpStack.push(op);
     if (reverseOperands)
         *fOpStack.push() = (Op) (kFlipOps | kArtificialOp);
-returnAdv:
-        return advance;
+
+    return advance;
 }
 
 bool SkScriptEngine2::convertParams(SkTDArray<SkScriptValue2>* params, 
index 649de1d..9859913 100644 (file)
@@ -157,7 +157,7 @@ static inline float fast_inc(float x) {
 }
 
 extern float dummy();
-int time_math() {
+static int time_math() {
     SkMSec now;
     int i;
     int sum = 0;
index 6952ae8..9aea795 100644 (file)
@@ -156,6 +156,7 @@ private:
     }
 };
 
+void ValidateHeap();
 void ValidateHeap()
 {
     SkBlockHeader::Validate();
index 636478d..e274579 100644 (file)
@@ -628,8 +628,8 @@ static int build_tri_edges(SkEdge edge[], const SkPoint pts[],
 }
 
 
-void sk_fill_triangle(const SkPoint pts[], const SkIRect* clipRect,
-                      SkBlitter* blitter, const SkIRect& ir) {
+static void sk_fill_triangle(const SkPoint pts[], const SkIRect* clipRect,
+                             SkBlitter* blitter, const SkIRect& ir) {
     SkASSERT(pts && blitter);
     
     SkEdge edgeStorage[3];
index 98adbbe..c2537b9 100644 (file)
@@ -328,16 +328,17 @@ pascal OSStatus SkOSWindow::EventHandler( EventHandlerCallRef inHandler, EventRe
 
                        switch (wKind) {
                 case kEventMouseDown:
-                    (void)win->handleClick(pt.h, pt.v, Click::kDown_State);
-                    result = noErr;
+                    if (win->handleClick(pt.h, pt.v, Click::kDown_State)) {
+                     //   result = noErr;
+                    }
                     break;
                 case kEventMouseDragged:
                     (void)win->handleClick(pt.h, pt.v, Click::kMoved_State);
-                    result = noErr;
+                  //  result = noErr;
                     break;
                 case kEventMouseUp:
                     (void)win->handleClick(pt.h, pt.v, Click::kUp_State);
-                    result = noErr;
+                  //  result = noErr;
                     break;
                 default:
                     break;