fix new warnings from gcc 4.2

git-svn-id: http://skia.googlecode.com/svn/trunk@384 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
reed@android.com 2009-10-14 09:36:25 +00:00
parent e3839f8b2f
commit 800046eba4
5 changed files with 13 additions and 11 deletions

View 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,

View 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;

View File

@ -156,6 +156,7 @@ private:
}
};
void ValidateHeap();
void ValidateHeap()
{
SkBlockHeader::Validate();

View 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];

View 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;