You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ma...@apache.org on 2019/09/30 10:19:21 UTC
[commons-daemon] branch master updated (407b28f -> 0367753)
This is an automated email from the ASF dual-hosted git repository.
markt pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git.
from 407b28f Add best guess for 1.2.2 release date
new 57cd31d Fix potential access to uninitialised variable
new 6e6e19d Remove unused code
new 5a19b12 Fix some -W4 compiler warnings "unreferenced formal parameter"
new f805314 Remove unused parameter from method. Fixes some -W4 compiler warnings.
new 6ffd26d Fix some -W4 compiler warnings "unreferenced formal parameter"
new bc87cdc Remove unused parameters
new d91fc7d Update change log
new 0367753 Fix remaining unreferenced formal parameter warnings
The 8 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
src/changes/changes.xml | 3 ++
src/native/windows/apps/prunmgr/prunmgr.c | 14 +++++----
src/native/windows/apps/prunsrv/prunsrv.c | 4 +++
src/native/windows/include/gui.h | 10 +++----
src/native/windows/src/console.c | 14 +++++----
src/native/windows/src/gui.c | 3 +-
src/native/windows/src/handles.c | 48 +++++++++++++++++--------------
src/native/windows/src/javajni.c | 6 +++-
src/native/windows/src/registry.c | 7 +++--
src/native/windows/src/service.c | 2 ++
10 files changed, 67 insertions(+), 44 deletions(-)
[commons-daemon] 05/08: Fix some -W4 compiler warnings
"unreferenced formal parameter"
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit 6ffd26d3d6bfe80860d8c93a32fc0b74b3a98c36
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 11:00:29 2019 +0100
Fix some -W4 compiler warnings "unreferenced formal parameter"
---
src/native/windows/apps/prunsrv/prunsrv.c | 4 +++
src/native/windows/src/handles.c | 48 +++++++++++++++++--------------
src/native/windows/src/javajni.c | 3 ++
src/native/windows/src/registry.c | 2 ++
src/native/windows/src/service.c | 2 ++
5 files changed, 37 insertions(+), 22 deletions(-)
diff --git a/src/native/windows/apps/prunsrv/prunsrv.c b/src/native/windows/apps/prunsrv/prunsrv.c
index fc06db8..022ab31 100644
--- a/src/native/windows/apps/prunsrv/prunsrv.c
+++ b/src/native/windows/apps/prunsrv/prunsrv.c
@@ -281,6 +281,7 @@ DWORD WINAPI eventThread(LPVOID lpParam)
}
ExitThread(0);
return 0;
+ UNREFERENCED_PARAMETER(lpParam);
}
/* redirect console stdout/stderr to files
@@ -962,6 +963,7 @@ BOOL child_callback(APXHANDLE hObject, UINT uMsg,
fputc(ch, stdout);
}
return TRUE;
+ UNREFERENCED_PARAMETER(hObject);
}
static int onExitStop(void)
@@ -1638,6 +1640,8 @@ cleanup:
reportServiceStatusStopped(rc);
gExitval = rc;
return;
+ UNREFERENCED_PARAMETER(argc);
+ UNREFERENCED_PARAMETER(argv);
}
diff --git a/src/native/windows/src/handles.c b/src/native/windows/src/handles.c
index bdd573d..bbbe412 100644
--- a/src/native/windows/src/handles.c
+++ b/src/native/windows/src/handles.c
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
#include "apxwin.h"
#include "private.h"
@@ -78,12 +78,12 @@ LPVOID HeapREALLOC(HANDLE hHeap, DWORD dwFlags, LPVOID lpMem, SIZE_T dwBytes)
}
#endif
-static LPVOID __apxPoolAllocCore(APXHANDLE hPool,
+static LPVOID __apxPoolAllocCore(APXHANDLE hPool,
DWORD dwSize, DWORD dwOptions)
{
DWORD dwPhysicalSize;
LPALLOCBLOCK lpBlock;
-
+
if (!hPool)
hPool = _st_sys_pool;
dwPhysicalSize = APX_ALIGN_DEFAULT(dwSize + sizeof(ALLOCBLOCK));
@@ -100,7 +100,7 @@ static LPVOID __apxPoolReallocCore(APXHANDLE hPool, LPVOID lpMem,
DWORD dwPhysicalSize;
LPALLOCBLOCK lpBlock;
LPALLOCBLOCK lpOrg;
-
+
if (!lpMem)
return __apxPoolAllocCore(hPool, dwSize, dwOptions);
lpOrg = (LPALLOCBLOCK)((char *)lpMem - sizeof(ALLOCBLOCK));
@@ -122,7 +122,7 @@ static void __apxPoolFreeCore(LPVOID lpMem)
{
APXHANDLE hPool;
LPALLOCBLOCK lpBlock = (LPALLOCBLOCK)((char *)lpMem - sizeof(ALLOCBLOCK));
-
+
if (lpBlock->lpPool != APXHANDLE_INVALID) {
hPool = lpBlock->lpPool;
lpBlock->lpPool = APXHANDLE_INVALID;
@@ -182,7 +182,7 @@ static BOOL __apxPoolCallback(APXHANDLE hObject, UINT uMsg,
TAILQ_FOREACH(hCur, &lpPool->lPools, queue) {
__apxPoolCallback(hCur, uMsg, 0, 0);
}
- /* call the handles callback */
+ /* call the handles callback */
for(hCur = TAILQ_FIRST(&lpPool->lHandles) ;
hCur != NULL ;
hCur = TAILQ_FIRST(&lpPool->lHandles)) {
@@ -198,6 +198,8 @@ static BOOL __apxPoolCallback(APXHANDLE hObject, UINT uMsg,
hObject->dwSize = 0;
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
static BOOL __apxHandleCallback(APXHANDLE hObject, UINT uMsg,
@@ -209,7 +211,7 @@ static BOOL __apxHandleCallback(APXHANDLE hObject, UINT uMsg,
/* Default handler handles only close event */
if (uMsg != WM_CLOSE)
return FALSE;
- if (hObject->dwType == APXHANDLE_TYPE_WINHANDLE &&
+ if (hObject->dwType == APXHANDLE_TYPE_WINHANDLE &&
!(IS_INVALID_HANDLE(hObject->uData.hWinHandle))) {
rv = CloseHandle(hObject->uData.hWinHandle);
hObject->uData.hWinHandle = NULL;
@@ -231,6 +233,8 @@ static BOOL __apxHandleCallback(APXHANDLE hObject, UINT uMsg,
hObject->dwFlags &= ~APXHANDLE_HAS_EVENT;
}
return rv;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
static BOOL __apxCreateSystemPool()
@@ -245,11 +249,11 @@ static BOOL __apxCreateSystemPool()
if (!_st_sys_page)
return FALSE;
_st_sys_page = VirtualAlloc(_st_sys_page, _st_sys_info.dwAllocationGranularity,
- MEM_COMMIT, PAGE_READWRITE);
+ MEM_COMMIT, PAGE_READWRITE);
/* Create the main Heap */
hHeap = HeapCREATE(0, _st_sys_info.dwAllocationGranularity, 0);
- _st_sys_pool = HeapALLOC(hHeap, HEAP_ZERO_MEMORY,
+ _st_sys_pool = HeapALLOC(hHeap, HEAP_ZERO_MEMORY,
APX_ALIGN_DEFAULT(APXHANDLE_SZ + sizeof(APXPOOL)));
_st_sys_pool->hHeap = hHeap;
_st_sys_pool->dwType = APXHANDLE_TYPE_INVALID;
@@ -261,7 +265,7 @@ static BOOL __apxCreateSystemPool()
TAILQ_INIT(&lpPool->lHandles);
TAILQ_INIT(&lpPool->lPools);
_st_sys_pool->dwType = APXHANDLE_TYPE_POOL;
-
+
/** TODO: For each unsupported function make a surrogate */
_st_sys_argvw = CommandLineToArgvW(GetCommandLineW(), &_st_sys_argc);
@@ -301,14 +305,14 @@ apxHandleManagerDestroy()
#endif
return TRUE;
}
-
+
return FALSE;
}
APXHANDLE
apxPoolCreate(APXHANDLE hParent, DWORD dwOptions)
{
- APXHANDLE hHandle;
+ APXHANDLE hHandle;
LPAPXPOOL lpPool;
HANDLE hHeap;
@@ -422,13 +426,13 @@ apxStrdupW(LPCWSTR szSource)
}
APXHANDLE
-apxHandleCreate(APXHANDLE hPool, DWORD dwFlags,
+apxHandleCreate(APXHANDLE hPool, DWORD dwFlags,
LPVOID lpData, DWORD dwDataSize,
LPAPXFNCALLBACK fnCallback)
{
- APXHANDLE hHandle;
+ APXHANDLE hHandle;
LPAPXPOOL lpPool;
-
+
if (IS_INVALID_HANDLE(hPool))
hPool = _st_sys_pool;
if (hPool->dwType != APXHANDLE_TYPE_POOL) {
@@ -438,7 +442,7 @@ apxHandleCreate(APXHANDLE hPool, DWORD dwFlags,
}
hHandle = __apxPoolAllocCore(hPool, APXHANDLE_SZ + dwDataSize,
HEAP_ZERO_MEMORY);
-
+
hHandle->hPool = hPool;
if (fnCallback)
hHandle->fnCallback = fnCallback;
@@ -489,7 +493,7 @@ apxCloseHandle(APXHANDLE hObject)
{
LPAPXPOOL lpPool;
APXCALLHOOK *lpCall;
-
+
if (IS_INVALID_HANDLE(hObject) || hObject->dwType == APXHANDLE_TYPE_INVALID)
return FALSE;
/* Call the user callback first */
@@ -538,7 +542,7 @@ apxHandleGetUserData(APXHANDLE hObject)
return hObject->uData.lpPtr;
}
-LPVOID
+LPVOID
apxHandleSetUserData(APXHANDLE hObject, LPVOID lpData, DWORD dwDataSize)
{
if (hObject->dwType == APXHANDLE_TYPE_INVALID)
@@ -548,7 +552,7 @@ apxHandleSetUserData(APXHANDLE hObject, LPVOID lpData, DWORD dwDataSize)
MIN(hObject->dwSize, dwDataSize));
return APXHANDLE_DATA(hObject);
}
- else {
+ else {
LPVOID lpOrg = hObject->uData.lpPtr;
hObject->uData.lpPtr = lpData;
return lpOrg;
@@ -578,7 +582,7 @@ BOOL apxHandlePostMessage(APXHANDLE hObject, UINT uMsg, WPARAM wParam, LPARAM lP
if (hObject->dwType == APXHANDLE_TYPE_INVALID)
return FALSE;
if (hObject->dwFlags & APXHANDLE_HAS_EVENT) {
- /* TODO: Create a thread message queue
+ /* TODO: Create a thread message queue
* Right now wait while the event gets nonsignaled
*/
while (WaitForSingleObject(hObject->hEventHandle, 0) == WAIT_OBJECT_0)
@@ -615,7 +619,7 @@ BOOL apxHandleAddHook(APXHANDLE hObject, DWORD dwWhere,
if (hObject->dwType == APXHANDLE_TYPE_INVALID || !fnCallback)
return FALSE;
- lpCall = (APXCALLHOOK *)__apxPoolAllocCore(hObject->hPool,
+ lpCall = (APXCALLHOOK *)__apxPoolAllocCore(hObject->hPool,
sizeof(APXCALLHOOK), 0);
if (!lpCall)
return FALSE;
@@ -628,7 +632,7 @@ BOOL apxHandleAddHook(APXHANDLE hObject, DWORD dwWhere,
TAILQ_INSERT_TAIL(&hObject->lCallbacks, lpCall, queue);
}
APXHANDLE_SPINUNLOCK(hObject);
-
+
return TRUE;
}
diff --git a/src/native/windows/src/javajni.c b/src/native/windows/src/javajni.c
index 81c6580..4f516cd 100644
--- a/src/native/windows/src/javajni.c
+++ b/src/native/windows/src/javajni.c
@@ -380,6 +380,8 @@ static BOOL __apxJavaJniCallback(APXHANDLE hObject, UINT uMsg,
break;
}
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
APXHANDLE
@@ -534,6 +536,7 @@ static jint JNICALL __apxJniVfprintf(FILE *fp, const char *format, va_list args)
if (apxLogWrite(APXLOG_MARK_INFO "%s", sBuf) == 0)
fputs(sBuf, stdout);
return rv;
+ UNREFERENCED_PARAMETER(fp);
}
static void JNICALL __apxJniExit(jint exitCode)
diff --git a/src/native/windows/src/registry.c b/src/native/windows/src/registry.c
index cd44952..3a3e5f7 100644
--- a/src/native/windows/src/registry.c
+++ b/src/native/windows/src/registry.c
@@ -119,6 +119,8 @@ static BOOL __apxRegistryCallback(APXHANDLE hObject, UINT uMsg,
break;
}
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
LPSTR __apxGetRegistrySzA(APXHANDLE hPool, HKEY hKey, LPCSTR szValueName)
diff --git a/src/native/windows/src/service.c b/src/native/windows/src/service.c
index 6317d58..7d1925e 100644
--- a/src/native/windows/src/service.c
+++ b/src/native/windows/src/service.c
@@ -73,6 +73,8 @@ static BOOL __apxServiceCallback(APXHANDLE hObject, UINT uMsg,
break;
}
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
APXHANDLE
[commons-daemon] 01/08: Fix potential access to uninitialised
variable
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit 57cd31de7a110c258a3fea7112fa7545e2c134eb
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 10:14:03 2019 +0100
Fix potential access to uninitialised variable
---
src/native/windows/src/javajni.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/src/native/windows/src/javajni.c b/src/native/windows/src/javajni.c
index a7f874c..81c6580 100644
--- a/src/native/windows/src/javajni.c
+++ b/src/native/windows/src/javajni.c
@@ -852,10 +852,11 @@ apxJavaCmdInitialize(APXHANDLE hPool, LPCWSTR szClassPath, LPCWSTR szClass,
*lppArray = (LPWSTR *)apxPoolAlloc(hPool, (nTotal + 2) * sizeof(LPWSTR));
/* Process JVM options */
+ i = 0;
if (nJVM && lJVM) {
p = (LPWSTR)apxPoolAlloc(hPool, (lJVM + 1) * sizeof(WCHAR));
AplCopyMemory(p, szOptions, (lJVM + 1) * sizeof(WCHAR) + sizeof(WCHAR));
- for (i = 0; i < nJVM; i++) {
+ for (; i < nJVM; i++) {
(*lppArray)[i] = p;
while (*p)
p++;
[commons-daemon] 08/08: Fix remaining unreferenced formal parameter
warnings
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit 036775385a73ede50aa254ba7bbe20169515dd45
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 11:18:44 2019 +0100
Fix remaining unreferenced formal parameter warnings
---
src/native/windows/apps/prunmgr/prunmgr.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/native/windows/apps/prunmgr/prunmgr.c b/src/native/windows/apps/prunmgr/prunmgr.c
index 0a1e405..a1e594f 100644
--- a/src/native/windows/apps/prunmgr/prunmgr.c
+++ b/src/native/windows/apps/prunmgr/prunmgr.c
@@ -182,6 +182,7 @@ static BOOL __startServiceCallback(APXHANDLE hObject, UINT uMsg,
break;
}
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
}
static BOOL __stopServiceCallback(APXHANDLE hObject, UINT uMsg,
@@ -1756,6 +1757,7 @@ static DWORD WINAPI refreshThread(LPVOID lpParam)
Sleep(1000);
}
return 0;
+ UNREFERENCED_PARAMETER(lpParam);
}
/* Main program entry
@@ -1917,6 +1919,9 @@ cleanup:
apxHandleManagerDestroy();
ExitProcess(0);
return 0;
+ UNREFERENCED_PARAMETER(hInstance);
+ UNREFERENCED_PARAMETER(hPrevInstance);
+ UNREFERENCED_PARAMETER(nCmdShow);
}
// TODO: Figure out a way to move apxSetInprocEnvironment from here and
[commons-daemon] 02/08: Remove unused code
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit 6e6e19d92ee5e9ceaa99f5ccc6d356f2f007c945
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 10:14:28 2019 +0100
Remove unused code
---
src/native/windows/src/registry.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/native/windows/src/registry.c b/src/native/windows/src/registry.c
index d5f1958..cd44952 100644
--- a/src/native/windows/src/registry.c
+++ b/src/native/windows/src/registry.c
@@ -650,7 +650,6 @@ apxRegistryDeleteW(APXHANDLE hRegistry, DWORD dwFrom,
{
LPAPXREGISTRY lpReg;
HKEY hKey, hSub = NULL;
- DWORD dwType = REG_SZ;
if (IS_INVALID_HANDLE(hRegistry) ||
hRegistry->dwType != APXHANDLE_TYPE_REGISTRY)
return FALSE;
[commons-daemon] 03/08: Fix some -W4 compiler warnings
"unreferenced formal parameter"
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit 5a19b12a55edc0bac116bda970c9b494e3008b48
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 10:31:27 2019 +0100
Fix some -W4 compiler warnings "unreferenced formal parameter"
---
src/native/windows/src/console.c | 14 ++++++++------
src/native/windows/src/gui.c | 1 +
2 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/src/native/windows/src/console.c b/src/native/windows/src/console.c
index 5ecb991..6fcc5af 100644
--- a/src/native/windows/src/console.c
+++ b/src/native/windows/src/console.c
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
#include "apxwin.h"
#include "private.h"
@@ -44,7 +44,7 @@ typedef struct stAPXCONSOLE_LAYOUT {
/** Character size */
POINT ptCharSize;
/** Current Screen size */
- POINT ptScreenSize;
+ POINT ptScreenSize;
/** Font size */
INT nFontSize;
/** Caret size */
@@ -53,14 +53,14 @@ typedef struct stAPXCONSOLE_LAYOUT {
UINT nCaretBlinkTime;
/** Typeface name of the font (32 char max including the null terminator) */
TCHAR szFontName[32];
-
+
} stAPXCONSOLE_LAYOUT, *APXCONSOLE_LAYOUT;
typedef struct stAPXCONSOLE {
/** Application instance handle */
HINSTANCE hInstance;
/** Console Screen Buffer */
- TCHAR lpScreenBuffer;
+ TCHAR lpScreenBuffer;
/** The size of the Console Screen Buffer */
DWORD dwScreenBufferSize;
/** Main window Handle */
@@ -90,12 +90,14 @@ static BOOL __apxConsoleCallback(APXHANDLE hObject, UINT uMsg,
return FALSE;
switch (uMsg) {
case WM_CLOSE:
-
+
break;
default:
break;
}
return TRUE;
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
}
APXHANDLE
@@ -117,7 +119,7 @@ apxFreeConsoleHandle(APXHANDLE hConsole)
APXCONSOLE lpConsole = APXHANDLE_DATA(hConsole);
if (hConsole->dwType != APXHANDLE_TYPE_CONSOLE)
return FALSE;
-
+
return apxCloseHandle(hConsole);
}
diff --git a/src/native/windows/src/gui.c b/src/native/windows/src/gui.c
index d780d24..dafdb2d 100644
--- a/src/native/windows/src/gui.c
+++ b/src/native/windows/src/gui.c
@@ -394,6 +394,7 @@ static LRESULT CALLBACK __apxAboutDlgProc(HWND hDlg, UINT uMsg,
}
return FALSE;
+ UNREFERENCED_PARAMETER(lParam);
}
void apxAboutBox(HWND hWnd)
[commons-daemon] 06/08: Remove unused parameters
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit bc87cdc09e36a72df103e40b044f39d9eee9ac16
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 11:04:21 2019 +0100
Remove unused parameters
---
src/native/windows/src/registry.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/native/windows/src/registry.c b/src/native/windows/src/registry.c
index 3a3e5f7..02a2cd2 100644
--- a/src/native/windows/src/registry.c
+++ b/src/native/windows/src/registry.c
@@ -159,7 +159,7 @@ LPWSTR __apxGetRegistrySzW(APXHANDLE hPool, HKEY hKey, LPCWSTR wsValueName)
return wsRet;
}
-BOOL __apxGetRegistryStrW(APXHANDLE hPool, HKEY hKey, LPCWSTR wsValueName,
+BOOL __apxGetRegistryStrW(HKEY hKey, LPCWSTR wsValueName,
LPWSTR lpRetval, DWORD dwMaxLen)
{
DWORD rc;
@@ -216,7 +216,7 @@ LPBYTE __apxGetRegistryBinaryW(APXHANDLE hPool, HKEY hKey, LPCWSTR wsValueName,
return lpRet;
}
-DWORD __apxGetRegistryDwordW(APXHANDLE hPool, HKEY hKey, LPCWSTR wsValueName)
+DWORD __apxGetRegistryDwordW(HKEY hKey, LPCWSTR wsValueName)
{
DWORD dwRet;
DWORD rc;
[commons-daemon] 07/08: Update change log
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit d91fc7dd993a4ebe3a533302607fa73b1029e1d1
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 11:04:37 2019 +0100
Update change log
---
src/changes/changes.xml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/changes/changes.xml b/src/changes/changes.xml
index 0924536..8b1685d 100644
--- a/src/changes/changes.xml
+++ b/src/changes/changes.xml
@@ -47,6 +47,9 @@
<action type="update" dev="markt">
Update Commons-Parent to version 49.
</action>
+ <action type="fix" dev="markt">
+ Fix compiler warnings for unreferenced formal parameters.
+ </action>
</release>
<release version="1.2.1" date="2019-09-09" description="Bug fix release">
<action issue="DAEMON-403" type="fix" dev="markt" due-to="Charles">
[commons-daemon] 04/08: Remove unused parameter from method. Fixes
some -W4 compiler warnings.
Posted by ma...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
commit f80531404b10bbea78ed61b65222107a5a56eb83
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Mon Sep 30 10:34:16 2019 +0100
Remove unused parameter from method. Fixes some -W4 compiler warnings.
---
src/native/windows/apps/prunmgr/prunmgr.c | 9 +++------
src/native/windows/include/gui.h | 10 +++++-----
src/native/windows/src/gui.c | 2 +-
3 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/native/windows/apps/prunmgr/prunmgr.c b/src/native/windows/apps/prunmgr/prunmgr.c
index fd95466..0a1e405 100644
--- a/src/native/windows/apps/prunmgr/prunmgr.c
+++ b/src/native/windows/apps/prunmgr/prunmgr.c
@@ -1028,8 +1028,7 @@ LRESULT CALLBACK __loggingProperty(HWND hDlg,
}
break;
case IDC_PPLGBPATH:
- lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_LGPATHTITLE, 0),
- NULL);
+ lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_LGPATHTITLE, 0));
if (lpBuf) {
SetDlgItemTextW(hDlg, IDC_PPLGPATH, lpBuf);
apxFree(lpBuf);
@@ -1295,8 +1294,7 @@ LRESULT CALLBACK __startProperty(HWND hDlg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_PPRBWPATH:
- lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_PPWPATH, 0),
- NULL);
+ lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_PPWPATH, 0));
if (lpBuf) {
SetDlgItemTextW(hDlg, IDC_PPRWPATH, lpBuf);
apxFree(lpBuf);
@@ -1455,8 +1453,7 @@ LRESULT CALLBACK __stopProperty(HWND hDlg,
case WM_COMMAND:
switch (LOWORD(wParam)) {
case IDC_PPSBWPATH:
- lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_PPWPATH, 0),
- NULL);
+ lpBuf = apxBrowseForFolderW(hDlg, apxLoadResourceW(IDS_PPWPATH, 0));
if (lpBuf) {
SetDlgItemTextW(hDlg, IDC_PPSWPATH, lpBuf);
apxFree(lpBuf);
diff --git a/src/native/windows/include/gui.h b/src/native/windows/include/gui.h
index c81b851..e2ab5a3 100644
--- a/src/native/windows/include/gui.h
+++ b/src/native/windows/include/gui.h
@@ -13,7 +13,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-
+
#ifndef _GUI_H_INCLUDED_
#define _GUI_H_INCLUDED_
@@ -50,7 +50,7 @@ __APXBEGIN_DECLS
#define IDSU_COMBO 274
-#define WM_TRAYMESSAGE (WM_APP+1)
+#define WM_TRAYMESSAGE (WM_APP+1)
#define SNDMSGW SendMessageW
#define SNDMSGA SendMessageA
@@ -89,7 +89,7 @@ typedef struct APXLVITEM {
INT iDefault;
INT iFmt;
LPTSTR szLabel;
-} APXLVITEM, *LPAPXLVITEM;
+} APXLVITEM, *LPAPXLVITEM;
typedef struct APXGUISTATE {
DWORD dwShow;
@@ -140,10 +140,10 @@ int apxProgressBox(HWND hWnd, LPCTSTR szHeader,
LPVOID cbData);
BOOL apxYesNoMessage(LPCTSTR szTitle, LPCTSTR szMessage, BOOL bStop);
-BOOL apxCalcStringEllipsis(HDC hDC, LPTSTR szString,
+BOOL apxCalcStringEllipsis(HDC hDC, LPTSTR szString,
int cchMax, UINT uColWidth);
-LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szName);
+LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle);
LPWSTR apxGetFileNameW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szFilter,
LPCWSTR szDefExt, LPCWSTR szDefPath, BOOL bOpenOrSave,
diff --git a/src/native/windows/src/gui.c b/src/native/windows/src/gui.c
index dafdb2d..1d3da65 100644
--- a/src/native/windows/src/gui.c
+++ b/src/native/windows/src/gui.c
@@ -484,7 +484,7 @@ BOOL apxYesNoMessage(LPCTSTR szTitle, LPCTSTR szMessage, BOOL bStop)
/* Browse for folder dialog.
*/
-LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle, LPCWSTR szName)
+LPWSTR apxBrowseForFolderW(HWND hWnd, LPCWSTR szTitle)
{
BROWSEINFOW bi;
LPITEMIDLIST il, ir;