Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kurtakov2017-09-27 07:44:06 +0000
committerAlexander Kurtakov2017-09-27 07:44:06 +0000
commitaab6e35f45638c8e78f68696d4e0d73927332d5d (patch)
tree63d1f57b8b2b68fc99e878c6444050f918bdf564 /bundles/org.eclipse.swt/Eclipse SWT Browser
parent5b8fa75d1f7bd7eb02164c4992685338c6ecbba4 (diff)
downloadeclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.tar.gz
eclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.tar.xz
eclipse.platform.swt-aab6e35f45638c8e78f68696d4e0d73927332d5d.zip
Bug 525255 - Enable indirect static usage warnings
Cover win32. Change-Id: Ifa0f68487fbcd57b84603c08ce5c388e74763706 Signed-off-by: Alexander Kurtakov <akurtako@redhat.com>
Diffstat (limited to 'bundles/org.eclipse.swt/Eclipse SWT Browser')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java16
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java42
2 files changed, 29 insertions, 29 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
index 7c1d8d1131..0f790edd2d 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/IE.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2003, 2016 IBM Corporation and others.
+ * Copyright (c) 2003, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -476,7 +476,7 @@ public void create(Composite parent, int style) {
Variant cancel1 = event.arguments[6];
if (cancel1 != null) {
long /*int*/ pCancel1 = cancel1.getByRef();
- COM.MoveMemory(pCancel1, new short[] {COM.VARIANT_FALSE}, 2);
+ OS.MoveMemory(pCancel1, new short[] {OS.VARIANT_FALSE}, 2);
}
isAboutBlank = false;
break;
@@ -511,7 +511,7 @@ public void create(Composite parent, int style) {
Variant cancel2 = event.arguments[6];
if (cancel2 != null) {
long /*int*/ pCancel2 = cancel2.getByRef();
- COM.MoveMemory(pCancel2, new short[] {COM.VARIANT_TRUE}, 2);
+ OS.MoveMemory(pCancel2, new short[] {OS.VARIANT_TRUE}, 2);
}
break;
}
@@ -528,7 +528,7 @@ public void create(Composite parent, int style) {
Variant cancel3 = event.arguments[6];
if (cancel3 != null) {
long /*int*/ pCancel3 = cancel3.getByRef();
- COM.MoveMemory(pCancel3, new short[] {doit1 ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2);
+ OS.MoveMemory(pCancel3, new short[] {doit1 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
}
if (doit1) {
varResult1 = event.arguments[0];
@@ -801,7 +801,7 @@ public void create(Composite parent, int style) {
Variant cancel4 = event.arguments[4];
if (cancel4 != null) {
long /*int*/ pCancel4 = cancel4.getByRef();
- COM.MoveMemory(pCancel4, new short[] {COM.VARIANT_TRUE}, 2);
+ OS.MoveMemory(pCancel4, new short[] {OS.VARIANT_TRUE}, 2);
}
browser.getDisplay().asyncExec(() -> {
if (browser.isDisposed()) return;
@@ -851,10 +851,10 @@ public void create(Composite parent, int style) {
IDispatch iDispatch = variant5.getDispatch();
Variant ppDisp = event.arguments[0];
long /*int*/ byref = ppDisp.getByRef();
- if (byref != 0) COM.MoveMemory(byref, new long /*int*/[] {iDispatch.getAddress()}, OS.PTR_SIZEOF);
+ if (byref != 0) OS.MoveMemory(byref, new long /*int*/[] {iDispatch.getAddress()}, C.PTR_SIZEOF);
}
if (newEvent2.required) {
- COM.MoveMemory(pCancel5, new short[]{doit2 ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2);
+ OS.MoveMemory(pCancel5, new short[]{doit2 ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
}
break;
}
@@ -1000,7 +1000,7 @@ public void create(Composite parent, int style) {
long /*int*/ pCancel6 = cancel6.getByRef();
Variant arg15 = event.arguments[0];
boolean isChildWindow = arg15.getBoolean();
- COM.MoveMemory(pCancel6, new short[]{isChildWindow ? COM.VARIANT_FALSE : COM.VARIANT_TRUE}, 2);
+ OS.MoveMemory(pCancel6, new short[]{isChildWindow ? OS.VARIANT_FALSE : OS.VARIANT_TRUE}, 2);
break;
}
case WindowSetHeight: {
diff --git a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
index 676f9a3f63..0266918897 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT Browser/win32/org/eclipse/swt/browser/WebSite.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2016 IBM Corporation and others.
+ * Copyright (c) 2000, 2017 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
@@ -164,7 +164,7 @@ protected void createCOMInterfaces () {
GUID guid = new GUID ();
COM.MoveMemory (guid, args[0], GUID.sizeof);
if (COM.IsEqualGUID (guid, COM.IIDIDispatch)) {
- COM.MoveMemory (args[1], new long /*int*/[] {iDispatch.getAddress ()}, OS.PTR_SIZEOF);
+ OS.MoveMemory (args[1], new long /*int*/[] {iDispatch.getAddress ()}, C.PTR_SIZEOF);
AddRef ();
return COM.S_OK;
}
@@ -232,31 +232,31 @@ protected int QueryInterface(long /*int*/ riid, long /*int*/ ppvObject) {
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIDocHostUIHandler)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iDocHostUIHandler.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostUIHandler.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIDocHostShowUI)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iDocHostShowUI.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iDocHostShowUI.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIServiceProvider)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iServiceProvider.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iServiceProvider.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIOleCommandTarget)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iOleCommandTarget.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -533,16 +533,16 @@ int QueryService(long /*int*/ guidService, long /*int*/ riid, long /*int*/ ppvOb
GUID guid = new GUID();
COM.MoveMemory(guid, riid, GUID.sizeof);
if (COM.IsEqualGUID(guid, COM.IIDIInternetSecurityManager)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iInternetSecurityManager.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
if (COM.IsEqualGUID(guid, COM.IIDIAuthenticate)) {
- COM.MoveMemory(ppvObject, new long /*int*/[] {iAuthenticate.getAddress()}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {iAuthenticate.getAddress()}, C.PTR_SIZEOF);
AddRef();
return COM.S_OK;
}
- COM.MoveMemory(ppvObject, new long /*int*/[] {0}, OS.PTR_SIZEOF);
+ OS.MoveMemory(ppvObject, new long /*int*/[] {0}, C.PTR_SIZEOF);
return COM.E_NOINTERFACE;
}
@@ -569,7 +569,7 @@ int MapUrlToZone(long /*int*/ pwszUrl, long /*int*/ pdwZone, int dwFlags) {
* been disposed. To detect this case check for ie.auto != null.
*/
if (ie.auto != null && ie.isAboutBlank && !ie.untrustedText) {
- COM.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4);
+ OS.MoveMemory(pdwZone, new int[] {IE.URLZONE_INTRANET}, 4);
return COM.S_OK;
}
return IE.INET_E_DEFAULT_ACTION;
@@ -589,7 +589,7 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i
if (dwAction == IE.URLACTION_FEATURE_ZONE_ELEVATION) {
IE ie = (IE)((Browser)getParent().getParent()).webBrowser;
if (ie.auto != null && ie._getUrl().startsWith(IE.ABOUT_BLANK) && !ie.untrustedText) {
- if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4);
+ if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {IE.URLPOLICY_ALLOW}, 4);
return COM.S_OK;
}
}
@@ -622,7 +622,7 @@ int ProcessUrlAction(long /*int*/ pwszUrl, int dwAction, long /*int*/ pPolicy, i
}
if (policy == IE.INET_E_DEFAULT_ACTION) return IE.INET_E_DEFAULT_ACTION;
- if (cbPolicy >= 4) COM.MoveMemory(pPolicy, new int[] {policy}, 4);
+ if (cbPolicy >= 4) OS.MoveMemory(pPolicy, new int[] {policy}, 4);
return policy == IE.URLPOLICY_ALLOW ? COM.S_OK : COM.S_FALSE;
}
@@ -719,11 +719,11 @@ int Authenticate (long /*int*/ hwnd, long /*int*/ szUsername, long /*int*/ szPas
if (event.user != null && event.password != null) {
TCHAR user = new TCHAR (0, event.user, true);
int size = user.length () * TCHAR.sizeof;
- long /*int*/ userPtr = COM.CoTaskMemAlloc (size);
+ long /*int*/ userPtr = OS.CoTaskMemAlloc (size);
OS.MoveMemory (userPtr, user, size);
TCHAR password = new TCHAR (0, event.password, true);
size = password.length () * TCHAR.sizeof;
- long /*int*/ passwordPtr = COM.CoTaskMemAlloc (size);
+ long /*int*/ passwordPtr = OS.CoTaskMemAlloc (size);
OS.MoveMemory (passwordPtr, password, size);
C.memmove (hwnd, new long /*int*/[] {0}, C.PTR_SIZEOF);
C.memmove (szUsername, new long /*int*/[] {userPtr}, C.PTR_SIZEOF);
@@ -776,7 +776,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
Map<Integer, BrowserFunction> functions = ie.functions;
if (functions == null) {
if (pVarResult != 0) {
- COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -785,7 +785,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
COM.MoveMemory (dispParams, pDispParams, DISPPARAMS.sizeof);
if (dispParams.cArgs != 3) {
if (pVarResult != 0) {
- COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -795,7 +795,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
if (variant.getType () != COM.VT_I4) {
variant.dispose ();
if (pVarResult != 0) {
- COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -803,7 +803,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
variant.dispose ();
if (index <= 0) {
if (pVarResult != 0) {
- COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}
@@ -814,7 +814,7 @@ int Invoke (int dispIdMember, long /*int*/ riid, int lcid, int dwFlags, long /*i
if (type != COM.VT_BSTR) {
variant.dispose ();
if (pVarResult != 0) {
- COM.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
+ OS.MoveMemory (pVarResult, new long /*int*/[] {0}, C.PTR_SIZEOF);
}
return COM.S_OK;
}

Back to the top