You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by mt...@apache.org on 2009/10/18 08:50:55 UTC
svn commit: r826366 - in
/commons/sandbox/runtime/trunk/src/main/native/os/win32: gui.c registry.c
wmi.cpp wutil.c
Author: mturk
Date: Sun Oct 18 06:50:54 2009
New Revision: 826366
URL: http://svn.apache.org/viewvc?rev=826366&view=rev
Log:
Fix compile warnigs
Modified:
commons/sandbox/runtime/trunk/src/main/native/os/win32/gui.c
commons/sandbox/runtime/trunk/src/main/native/os/win32/registry.c
commons/sandbox/runtime/trunk/src/main/native/os/win32/wmi.cpp
commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/gui.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/gui.c?rev=826366&r1=826365&r2=826366&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/gui.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/gui.c Sun Oct 18 06:50:54 2009
@@ -170,7 +170,7 @@
BOOL rv = FALSE;
BROWSEINFOW bi;
- ITEMIDLIST *il , *ir;
+ PIDLIST_ABSOLUTE il, ir;
LPMALLOC pMalloc;
memset(&bi, 0, sizeof(BROWSEINFOW));
@@ -192,4 +192,3 @@
}
return rv;
}
-
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/registry.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/registry.c?rev=826366&r1=826365&r2=826366&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/registry.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/registry.c Sun Oct 18 06:50:54 2009
@@ -311,19 +311,19 @@
wp = x_wcsdup_utf8(value);
rc = RegSetValueExW(k->key, wn, 0, st,
(const unsigned char *)wp,
- (wcslen(wp) + 1) * sizeof(wchar_t));
+ (DWORD)((wcslen(wp) + 1) * sizeof(wchar_t)));
x_free(wp);
break;
case REG_MULTI_SZ:
wp = x_wcsdup_utf8(value);
- rl = wcslen(wp);
+ rl = (DWORD)wcslen(wp);
for (p = wp; *p; p++) {
if (*p == sc)
*p = L'\0';
}
rc = RegSetValueExW(k->key, wn, 0, st,
(const unsigned char *)wp,
- (rl + 2) * sizeof(wchar_t));
+ (DWORD)((rl + 2) * sizeof(wchar_t)));
x_free(wp);
break;
case REG_DWORD:
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wmi.cpp
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wmi.cpp?rev=826366&r1=826365&r2=826366&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wmi.cpp (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wmi.cpp Sun Oct 18 06:50:54 2009
@@ -45,7 +45,7 @@
static int cosec_inited = 0;
extern "C"
-void *wmi_intialize(JNIEnv *_E, const jchar *ns, jsize nsl)
+void *wmi_intialize(JNIEnv *_E, const wchar_t *ns, jsize nsl)
{
wmi_data_t *wd;
HRESULT hres;
@@ -183,8 +183,8 @@
}
extern "C"
-int wmi_query(void *wmi, const jchar *lang, jsize langl,
- const jchar *query, jsize queryl)
+int wmi_query(void *wmi, const wchar_t *lang, jsize langl,
+ const wchar_t *query, jsize queryl)
{
HRESULT hres;
wmi_data_t *wd = (wmi_data_t *)wmi;
Modified: commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c
URL: http://svn.apache.org/viewvc/commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c?rev=826366&r1=826365&r2=826366&view=diff
==============================================================================
--- commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c (original)
+++ commons/sandbox/runtime/trunk/src/main/native/os/win32/wutil.c Sun Oct 18 06:50:54 2009
@@ -173,7 +173,7 @@
}
}
if (!MultiByteToWideChar(CP_UTF8, MB_ERR_INVALID_CHARS,
- srcstr, srclen, t, retlen))
+ srcstr, (int)srclen, t, (int)retlen))
return ACR_GET_OS_ERROR();
for (; *t; t++) {
if (*t == L'/')
@@ -207,7 +207,7 @@
}
}
- if (!WideCharToMultiByte(CP_UTF8, 0, srcstr, -1, retstr, retlen, NULL, 0))
+ if (!WideCharToMultiByte(CP_UTF8, 0, srcstr, -1, retstr, (int)retlen, NULL, 0))
return ACR_GET_OS_ERROR();
/* Translate all back to forward slashes.
* On Win32 for utf8 paths we always use the forwrd slashes.