8080492: [Parfait] Uninitialised variable in jdk/src/java/desktop/windows/native/libawt/
Reviewed-by: prr, vadim
This commit is contained in:
parent
46f6e32652
commit
e3c4a8683a
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2008, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -508,8 +508,10 @@ D3DBlitTextureToSurface(D3DContext *d3dc,
|
||||
RETURN_STATUS_IF_NULL(srcOps->pResource, E_FAIL);
|
||||
RETURN_STATUS_IF_NULL(dstOps->pResource, E_FAIL);
|
||||
|
||||
if ((pSrc = srcOps->pResource->GetTexture()) == NULL ||
|
||||
FAILED(res = d3dc->BeginScene(STATE_TEXTUREOP) ||
|
||||
pSrc = srcOps->pResource->GetTexture();
|
||||
RETURN_STATUS_IF_NULL(pSrc, E_FAIL);
|
||||
|
||||
if (FAILED(res = d3dc->BeginScene(STATE_TEXTUREOP) ||
|
||||
FAILED(res = d3dc->SetTexture(pSrc))))
|
||||
{
|
||||
J2dRlsTraceLn(J2D_TRACE_ERROR,
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 2007, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 2007, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -355,7 +355,7 @@ D3DTR_UpdateCachedDestination(D3DContext *d3dc, D3DSDOps *dstOps,
|
||||
jint dx1, dy1, dx2, dy2;
|
||||
D3DResource *pCachedDestTexRes;
|
||||
IDirect3DSurface9 *pCachedDestSurface, *pDst;
|
||||
HRESULT res;
|
||||
HRESULT res = S_OK;
|
||||
|
||||
if (isCachedDestValid && INSIDE(gx1, gy1, gx2, gy2, cachedDestBounds)) {
|
||||
// glyph is already within the cached destination bounds; no need
|
||||
|
@ -686,6 +686,9 @@ JNIEXPORT jlong JNICALL Java_sun_awt_shell_Win32ShellFolder2_getLinkLocation
|
||||
case STRRET_WSTR :
|
||||
wstr = strret.pOleStr;
|
||||
break;
|
||||
|
||||
default:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
IShellLinkW* psl;
|
||||
|
@ -5234,6 +5234,8 @@ void AwtComponent::SynthesizeMouseMessage(JNIEnv *env, jobject mouseEvent)
|
||||
message = WM_MBUTTONDOWN; break;
|
||||
case java_awt_event_MouseEvent_BUTTON2:
|
||||
message = WM_RBUTTONDOWN; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -5245,6 +5247,8 @@ void AwtComponent::SynthesizeMouseMessage(JNIEnv *env, jobject mouseEvent)
|
||||
message = WM_MBUTTONUP; break;
|
||||
case java_awt_event_MouseEvent_BUTTON2:
|
||||
message = WM_RBUTTONUP; break;
|
||||
default:
|
||||
return;
|
||||
}
|
||||
break;
|
||||
}
|
||||
@ -7305,4 +7309,4 @@ void ReleaseDCList(HWND hwnd, DCList &list) {
|
||||
removedDCs = removedDCs->next;
|
||||
delete tmpDCList;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1999, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -388,7 +388,7 @@ void CheckFontSmoothingSettings(HWND hWnd) {
|
||||
}
|
||||
|
||||
BOOL fontSmoothing = FALSE, settingsChanged;
|
||||
UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder;
|
||||
UINT fontSmoothingType=0, fontSmoothingContrast=0, subPixelOrder=0;
|
||||
|
||||
if (firstTime) {
|
||||
SystemParametersInfo(SPI_GETFONTSMOOTHING, 0, &fontSmoothing, 0);
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2015, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -270,7 +270,7 @@ AwtFont* AwtFont::Create(JNIEnv *env, jobject font, jint angle, jfloat awScale)
|
||||
cfnum = 0;
|
||||
}
|
||||
|
||||
LPCWSTR wName;
|
||||
LPCWSTR wName = NULL;
|
||||
|
||||
awtFont = new AwtFont(cfnum, env, font);
|
||||
|
||||
@ -1202,7 +1202,7 @@ void AwtFontCache::IncRefCount(HFONT hFont){
|
||||
}
|
||||
|
||||
LONG AwtFontCache::IncRefCount(Item* item){
|
||||
LONG newVal;
|
||||
LONG newVal = 0;
|
||||
|
||||
if(NULL != item){
|
||||
newVal = InterlockedIncrement((long*)&item->refCount);
|
||||
@ -1211,7 +1211,7 @@ LONG AwtFontCache::IncRefCount(Item* item){
|
||||
}
|
||||
|
||||
LONG AwtFontCache::DecRefCount(Item* item){
|
||||
LONG newVal;
|
||||
LONG newVal = 0;
|
||||
|
||||
if(NULL != item){
|
||||
newVal = InterlockedDecrement((long*)&item->refCount);
|
||||
|
@ -156,7 +156,7 @@ AwtFrame* AwtFrame::Create(jobject self, jobject parent)
|
||||
|
||||
PDATA pData;
|
||||
HWND hwndParent = NULL;
|
||||
AwtFrame* frame;
|
||||
AwtFrame* frame = NULL;
|
||||
jclass cls = NULL;
|
||||
jclass inputMethodWindowCls = NULL;
|
||||
jobject target = NULL;
|
||||
@ -993,7 +993,9 @@ MsgRouting AwtFrame::WmActivate(UINT nState, BOOL fMinimized, HWND opposite)
|
||||
AwtComponent::SetFocusedWindow(GetHWnd());
|
||||
|
||||
} else {
|
||||
if (!::IsWindow(AwtWindow::GetModalBlocker(opposite))) {
|
||||
if (::IsWindow(AwtWindow::GetModalBlocker(opposite))) {
|
||||
return mrConsume;
|
||||
} else {
|
||||
// If deactivation happens because of press on grabbing
|
||||
// window - this is nonsense, since grabbing window is
|
||||
// assumed to have focus and watch for deactivation. But
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -146,15 +146,16 @@ void AwtLabel::DoPaint(HDC hDC, RECT& r)
|
||||
|
||||
jint alignment = env->GetIntField(target, AwtLabel::alignmentID);
|
||||
switch (alignment) {
|
||||
case java_awt_Label_LEFT:
|
||||
x = r.left + 2;
|
||||
break;
|
||||
case java_awt_Label_CENTER:
|
||||
x = (r.left + r.right - size.cx) / 2;
|
||||
break;
|
||||
case java_awt_Label_RIGHT:
|
||||
x = r.right - 2 - size.cx;
|
||||
break;
|
||||
case java_awt_Label_LEFT:
|
||||
default:
|
||||
x = r.left + 2;
|
||||
break;
|
||||
}
|
||||
/* draw string */
|
||||
if (isEnabled()) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2014, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -1108,7 +1108,7 @@ Java_sun_awt_windows_WPrinterJob_initPrinter(JNIEnv *env, jobject self) {
|
||||
// check for collation
|
||||
HGLOBAL hDevNames = AwtPrintControl::getPrintHDName(env, self);
|
||||
if (hDevNames != NULL) {
|
||||
DWORD dmFields;
|
||||
DWORD dmFields = 0;
|
||||
DEVNAMES *devnames = (DEVNAMES *)::GlobalLock(hDevNames);
|
||||
|
||||
if (devnames != NULL) {
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (c) 1996, 2013, Oracle and/or its affiliates. All rights reserved.
|
||||
* Copyright (c) 1996, 2016, Oracle and/or its affiliates. All rights reserved.
|
||||
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
|
||||
*
|
||||
* This code is free software; you can redistribute it and/or modify it
|
||||
@ -129,6 +129,7 @@ AwtTextComponent* AwtTextComponent::Create(jobject peer, jobject parent, BOOL is
|
||||
scroll_style = WS_HSCROLL | ES_AUTOHSCROLL | ES_AUTOVSCROLL;
|
||||
break;
|
||||
case java_awt_TextArea_SCROLLBARS_BOTH:
|
||||
default:
|
||||
scroll_style = WS_VSCROLL | WS_HSCROLL |
|
||||
ES_AUTOVSCROLL | ES_AUTOHSCROLL;
|
||||
break;
|
||||
|
Loading…
x
Reference in New Issue
Block a user