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/win32/org/eclipse
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/win32/org/eclipse')
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java4
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java2
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java10
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java6
-rw-r--r--bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java2
7 files changed, 18 insertions, 18 deletions
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
index b7cbc52ed8..b301e337bd 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Device.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
@@ -715,7 +715,7 @@ protected void init () {
int [] piNumScripts = new int [1];
OS.ScriptGetProperties (ppSp, piNumScripts);
scripts = new long /*int*/ [piNumScripts [0]];
- OS.MoveMemory (scripts, ppSp [0], scripts.length * OS.PTR_SIZEOF);
+ OS.MoveMemory (scripts, ppSp [0], scripts.length * C.PTR_SIZEOF);
}
/*
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
index 93474be89a..950a761148 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Image.java
@@ -817,7 +817,7 @@ void initNative(String filename) {
* when loading GIF files in 64-bit Windows. The fix is to not use
* GDI+ image loading in this case.
*/
- if (gdip && OS.PTR_SIZEOF == 8 && filename.toLowerCase().endsWith(".gif")) gdip = false;
+ if (gdip && C.PTR_SIZEOF == 8 && filename.toLowerCase().endsWith(".gif")) gdip = false;
/*
* Bug in GDI+. Bitmap.LockBits() fails to load GIF files in
* Windows 7 when the image has a position offset in the first frame.
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
index 011b443883..4293a2cda7 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/TextLayout.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2015 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
@@ -1096,7 +1096,7 @@ RECT drawRunTextGDIP(long /*int*/ graphics, StyleItem run, RECT rect, long /*int
}
int[] advances = new int[run.glyphCount];
float[] points = new float[run.glyphCount * 2];
- OS.memmove(advances, run.justify != 0 ? run.justify : run.advances, run.glyphCount * 4);
+ C.memmove(advances, run.justify != 0 ? run.justify : run.advances, run.glyphCount * 4);
int glyphX = drawX;
for (int h = 0, j = 0; h < advances.length; h++) {
points[j++] = glyphX;
@@ -3372,7 +3372,7 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF);
}
return false;
}
@@ -3397,7 +3397,7 @@ boolean shape (long /*int*/ hdc, StyleItem run, char[] chars, int[] glyphCount,
if (run.psc != 0) {
OS.ScriptFreeCache(run.psc);
glyphCount[0] = 0;
- OS.MoveMemory(run.psc, new long /*int*/ [1], OS.PTR_SIZEOF);
+ OS.MoveMemory(run.psc, new long /*int*/ [1], C.PTR_SIZEOF);
}
run.glyphCount = 0;
return false;
@@ -3421,7 +3421,7 @@ void shape (final long /*int*/ hdc, final StyleItem run) {
if (run.clusters == 0) SWT.error(SWT.ERROR_NO_HANDLES);
run.visAttrs = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, maxGlyphs * SCRIPT_VISATTR_SIZEOF);
if (run.visAttrs == 0) SWT.error(SWT.ERROR_NO_HANDLES);
- run.psc = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, OS.PTR_SIZEOF);
+ run.psc = OS.HeapAlloc(hHeap, OS.HEAP_ZERO_MEMORY, C.PTR_SIZEOF);
if (run.psc == 0) SWT.error(SWT.ERROR_NO_HANDLES);
final short script = run.analysis.eScript;
final SCRIPT_PROPERTIES sp = new SCRIPT_PROPERTIES();
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
index 86f8b86573..4664cadf3f 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Combo.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
@@ -2806,7 +2806,7 @@ long /*int*/ windowProc (long /*int*/ hwnd, int msg, long /*int*/ wParam, long /
case OS.CB_FINDSTRINGEXACT:
if (lParam != 0 && (hooks (SWT.Segments) || filters (SWT.Segments) || ((state & HAS_AUTO_DIRECTION) != 0))) {
long /*int*/ code = OS.CB_ERR;
- int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam);
+ int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam);
TCHAR buffer = new TCHAR (getCodePage (), length);
OS.MoveMemory (buffer, lParam, buffer.length () * TCHAR.sizeof);
String string = buffer.toString (0, length);
@@ -3169,7 +3169,7 @@ LRESULT wmClipboard (long /*int*/ hwndText, int msg, long /*int*/ wParam, long /
case OS.WM_SETTEXT:
if (lockText) return null;
end [0] = OS.GetWindowTextLength (hwndText);
- int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam);
+ int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam);
TCHAR buffer = new TCHAR (getCodePage (), length);
int byteCount = buffer.length () * TCHAR.sizeof;
OS.MoveMemory (buffer, lParam, byteCount);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
index f299207d2c..6c7b65fc82 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/DirectoryDialog.java
@@ -1,5 +1,5 @@
/*******************************************************************************
- * Copyright (c) 2000, 2012 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
@@ -11,9 +11,9 @@
package org.eclipse.swt.widgets;
+import org.eclipse.swt.*;
import org.eclipse.swt.internal.*;
import org.eclipse.swt.internal.win32.*;
-import org.eclipse.swt.*;
/**
* Instances of this class allow the user to navigate
@@ -100,7 +100,7 @@ long /*int*/ BrowseCallbackProc (long /*int*/ hwnd, long /*int*/ uMsg, long /*in
case OS.BFFM_VALIDATEFAILEDA:
case OS.BFFM_VALIDATEFAILEDW:
/* Use the character encoding for the default locale */
- int length = OS.IsUnicode ? OS.wcslen (lParam) : OS.strlen (lParam);
+ int length = OS.IsUnicode ? OS.wcslen (lParam) : C.strlen (lParam);
TCHAR buffer = new TCHAR (0, length);
int byteCount = buffer.length () * TCHAR.sizeof;
OS.MoveMemory (buffer, lParam, byteCount);
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
index 0b1698bdd6..c3e4211baa 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
@@ -3467,7 +3467,7 @@ String getSharedData(int pid, int handle) {
long /*int*/ sharedData = OS.MapViewOfFile(mapHandle[0], OS.FILE_MAP_READ, 0, 0, 0);
if (sharedData == 0) return null;
- int length = OS.IsUnicode ? OS.wcslen (sharedData) : OS.strlen (sharedData);
+ int length = OS.IsUnicode ? OS.wcslen (sharedData) : C.strlen (sharedData);
TCHAR buffer = new TCHAR (0, length);
int byteCount = buffer.length () * TCHAR.sizeof;
OS.MoveMemory (buffer, sharedData, byteCount);
@@ -3680,7 +3680,7 @@ public boolean post (Event event) {
long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_KEYBOARD}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
- OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
+ OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, KEYBDINPUT.sizeof);
boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
OS.HeapFree (hHeap, 0, pInputs);
return result;
@@ -3746,7 +3746,7 @@ public boolean post (Event event) {
long /*int*/ pInputs = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, INPUT.sizeof);
OS.MoveMemory(pInputs, new int[] {OS.INPUT_MOUSE}, 4);
//TODO - DWORD type of INPUT structure aligned to 8 bytes on 64 bit
- OS.MoveMemory (pInputs + OS.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
+ OS.MoveMemory (pInputs + C.PTR_SIZEOF, inputs, MOUSEINPUT.sizeof);
boolean result = OS.SendInput (1, pInputs, INPUT.sizeof) != 0;
OS.HeapFree (hHeap, 0, pInputs);
return result;
diff --git a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
index 2bb053072c..a039a0a731 100644
--- a/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
+++ b/bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/TaskBar.java
@@ -149,7 +149,7 @@ long /*int*/ createShellLink (MenuItem item, String directory) {
titlePtr = OS.HeapAlloc (hHeap, OS.HEAP_ZERO_MEMORY, buffer.length * 2);
OS.MoveMemory (titlePtr, buffer, buffer.length * 2);
OS.MoveMemory (pv, new short [] {OS.VT_LPWSTR}, 2);
- OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, OS.PTR_SIZEOF);
+ OS.MoveMemory (pv + 8, new long /*int*/ [] {titlePtr}, C.PTR_SIZEOF);
key = PKEY_Title;
/*IShellLink::SetPath*/

Back to the top