Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
dd073bbb
Commit
dd073bbb
authored
Feb 14, 2005
by
Francois Gouget
Committed by
Alexandre Julliard
Feb 14, 2005
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Cast the GetProcAddress() return value to avoid warnings about the
function pointer being of the wrong type. Fix assorted signed/unsigned comparison warnings.
parent
e84f07de
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
15 additions
and
16 deletions
+15
-16
security.c
dlls/advapi32/tests/security.c
+4
-4
metafile.c
dlls/gdi/tests/metafile.c
+4
-5
mlang.c
dlls/mlang/tests/mlang.c
+3
-3
file.c
dlls/msvcrt/tests/file.c
+2
-2
path.c
dlls/ntdll/tests/path.c
+2
-2
No files found.
dlls/advapi32/tests/security.c
View file @
dd073bbb
...
...
@@ -224,7 +224,7 @@ static void test_allocateLuid(void)
LUID
luid1
,
luid2
;
BOOL
ret
;
pAllocateLocallyUniqueId
=
GetProcAddress
(
hmod
,
"AllocateLocallyUniqueId"
);
pAllocateLocallyUniqueId
=
(
void
*
)
GetProcAddress
(
hmod
,
"AllocateLocallyUniqueId"
);
if
(
!
pAllocateLocallyUniqueId
)
return
;
ret
=
pAllocateLocallyUniqueId
(
&
luid1
);
...
...
@@ -256,7 +256,7 @@ static void test_lookupPrivilegeName(void)
BOOL
ret
;
/* check whether it's available first */
pLookupPrivilegeNameA
=
GetProcAddress
(
hmod
,
"LookupPrivilegeNameA"
);
pLookupPrivilegeNameA
=
(
void
*
)
GetProcAddress
(
hmod
,
"LookupPrivilegeNameA"
);
if
(
!
pLookupPrivilegeNameA
)
return
;
luid
.
LowPart
=
SE_CREATE_TOKEN_PRIVILEGE
;
ret
=
pLookupPrivilegeNameA
(
NULL
,
&
luid
,
buf
,
&
cchName
);
...
...
@@ -309,7 +309,7 @@ static void test_lookupPrivilegeName(void)
struct
NameToLUID
{
const
char
*
name
;
LONG
lowPart
;
DWORD
lowPart
;
};
static
void
test_lookupPrivilegeValue
(
void
)
...
...
@@ -351,7 +351,7 @@ static void test_lookupPrivilegeValue(void)
BOOL
ret
;
/* check whether it's available first */
pLookupPrivilegeValueA
=
GetProcAddress
(
hmod
,
"LookupPrivilegeValueA"
);
pLookupPrivilegeValueA
=
(
void
*
)
GetProcAddress
(
hmod
,
"LookupPrivilegeValueA"
);
if
(
!
pLookupPrivilegeValueA
)
return
;
ret
=
pLookupPrivilegeValueA
(
NULL
,
"SeCreateTokenPrivilege"
,
&
luid
);
if
(
!
ret
&&
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
)
...
...
dlls/gdi/tests/metafile.c
View file @
dd073bbb
...
...
@@ -259,8 +259,7 @@ static const unsigned char MF_PATTERN_BRUSH_BITS[] = {
static
void
dump_mf_bits
(
const
HMETAFILE
mf
,
const
char
*
desc
)
{
char
buf
[
MF_BUFSIZE
];
UINT
mfsize
;
int
i
;
UINT
mfsize
,
i
;
mfsize
=
GetMetaFileBitsEx
(
mf
,
MF_BUFSIZE
,
buf
);
ok
(
mfsize
>
0
,
"%s: GetMetaFileBitsEx failed.
\n
"
,
desc
);
...
...
@@ -286,12 +285,12 @@ static void dump_mf_bits (const HMETAFILE mf, const char *desc)
* otherwise returns the number of non-matching bytes.
*/
static
int
compare_mf_bits
(
const
HMETAFILE
mf
,
const
char
*
bits
,
int
bsize
,
static
int
compare_mf_bits
(
const
HMETAFILE
mf
,
const
char
*
bits
,
UINT
bsize
,
const
char
*
desc
)
{
char
buf
[
MF_BUFSIZE
];
UINT
mfsize
;
int
i
,
diff
;
UINT
mfsize
,
i
;
int
diff
;
mfsize
=
GetMetaFileBitsEx
(
mf
,
MF_BUFSIZE
,
buf
);
ok
(
mfsize
>
0
,
"%s: GetMetaFileBitsEx failed.
\n
"
,
desc
);
...
...
dlls/mlang/tests/mlang.c
View file @
dd073bbb
...
...
@@ -51,7 +51,7 @@ static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2)
WCHAR
stringW
[]
=
{
'J'
,
'u'
,
's'
,
't'
,
' '
,
'a'
,
' '
,
't'
,
'e'
,
's'
,
't'
,
' '
,
's'
,
't'
,
'r'
,
'i'
,
'n'
,
'g'
,
0
};
char
bufA
[
256
];
WCHAR
bufW
[
256
];
UINT
lenA
,
lenW
,
expected_len
;
int
lenA
,
lenW
,
expected_len
;
HRESULT
ret
;
HMODULE
hMlang
;
FARPROC
pConvertINetMultiByteToUnicode
;
...
...
@@ -105,7 +105,7 @@ static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2)
ret
=
IMultiLanguage2_ConvertStringToUnicode
(
iML2
,
NULL
,
CP_UNICODE
,
stringA
,
&
lenA
,
bufW
,
&
lenW
);
ok
(
ret
==
S_OK
,
"IMultiLanguage2_ConvertStringToUnicode failed: %08lx
\n
"
,
ret
);
ok
(
lenA
==
lstrlenA
(
stringA
),
"expected lenA %u, got %u
\n
"
,
lstrlenA
(
stringA
),
lenA
);
ok
(
lenW
==
lstrlenW
(
stringW
)
/
sizeof
(
WCHAR
),
"expected lenW %u, got %u
\n
"
,
lstrlenW
(
stringW
)
/
sizeof
(
WCHAR
),
lenW
);
ok
(
lenW
==
lstrlenW
(
stringW
)
/
(
int
)
sizeof
(
WCHAR
),
"expected lenW %u, got %u
\n
"
,
lstrlenW
(
stringW
)
/
sizeof
(
WCHAR
),
lenW
);
ok
(
bufW
[
lenW
]
!=
0
,
"buf should not be 0 terminated
\n
"
);
bufW
[
lenW
]
=
0
;
/* -1 doesn't include 0 terminator */
ok
(
!
lstrcmpA
((
LPCSTR
)
bufW
,
stringA
),
"bufW/stringA mismatch
\n
"
);
...
...
@@ -176,7 +176,7 @@ static void test_multibyte_to_unicode_translations(IMultiLanguage2 *iML2)
TRACE_2
(
"Call IMultiLanguage2_ConvertStringFromUnicode
\n
"
);
ret
=
IMultiLanguage2_ConvertStringFromUnicode
(
iML2
,
NULL
,
CP_UNICODE
,
stringW
,
&
lenW
,
bufA
,
&
lenA
);
ok
(
ret
==
S_OK
,
"IMultiLanguage2_ConvertStringFromUnicode failed: %08lx
\n
"
,
ret
);
ok
(
lenA
==
lstrlenA
(
stringA
)
*
sizeof
(
WCHAR
),
"expected lenA %u, got %u
\n
"
,
lstrlenA
(
stringA
)
*
sizeof
(
WCHAR
),
lenA
);
ok
(
lenA
==
lstrlenA
(
stringA
)
*
(
int
)
sizeof
(
WCHAR
),
"expected lenA %u, got %u
\n
"
,
lstrlenA
(
stringA
)
*
sizeof
(
WCHAR
),
lenA
);
ok
(
lenW
==
lstrlenW
(
stringW
),
"expected lenW %u, got %u
\n
"
,
lstrlenW
(
stringW
),
lenW
);
ok
(
bufA
[
lenA
]
!=
0
&&
bufA
[
lenA
+
1
]
!=
0
,
"buf should not be 0 terminated
\n
"
);
bufA
[
lenA
]
=
0
;
/* -1 doesn't include 0 terminator */
...
...
dlls/msvcrt/tests/file.c
View file @
dd073bbb
...
...
@@ -71,7 +71,7 @@ static void test_fileops( void )
ok
(
feof
(
file
)
!=
0
,
"feof doesn't signal EOF
\n
"
);
rewind
(
file
);
ok
(
fgets
(
buffer
,
strlen
(
outbuffer
),
file
)
!=
0
,
"fgets failed unexpected
\n
"
);
ok
(
lstrlenA
(
buffer
)
==
strlen
(
outbuffer
)
-
1
,
"fgets didn't read right size
\n
"
);
ok
(
lstrlenA
(
buffer
)
==
lstrlenA
(
outbuffer
)
-
1
,
"fgets didn't read right size
\n
"
);
ok
(
fgets
(
buffer
,
sizeof
(
outbuffer
),
file
)
!=
0
,
"fgets failed unexpected
\n
"
);
ok
(
strlen
(
buffer
)
==
1
,
"fgets dropped chars
\n
"
);
ok
(
buffer
[
0
]
==
outbuffer
[
strlen
(
outbuffer
)
-
1
],
"fgets exchanged chars
\n
"
);
...
...
@@ -83,7 +83,7 @@ static void test_fileops( void )
ok
(
feof
(
file
)
!=
0
,
"feof doesn't signal EOF
\n
"
);
rewind
(
file
);
ok
(
fgetws
(
wbuffer
,
strlen
(
outbuffer
),
file
)
!=
0
,
"fgetws failed unexpected
\n
"
);
ok
(
lstrlenW
(
wbuffer
)
==
(
strlen
(
outbuffer
)
-
1
),
"fgetws didn't read right size
\n
"
);
ok
(
lstrlenW
(
wbuffer
)
==
(
lstrlenA
(
outbuffer
)
-
1
),
"fgetws didn't read right size
\n
"
);
ok
(
fgetws
(
wbuffer
,
sizeof
(
outbuffer
),
file
)
!=
0
,
"fgets failed unexpected
\n
"
);
ok
(
lstrlenW
(
wbuffer
)
==
1
,
"fgets dropped chars
\n
"
);
fclose
(
file
);
...
...
dlls/ntdll/tests/path.c
View file @
dd073bbb
...
...
@@ -35,7 +35,7 @@ static void test_RtlDetermineDosPathNameType(void)
struct
test
{
const
char
*
path
;
int
ret
;
UINT
ret
;
};
static
const
struct
test
tests
[]
=
...
...
@@ -255,7 +255,7 @@ static void test_RtlGetFullPathName_U()
ULONG
ret
;
WCHAR
*
file_part
;
DWORD
reslen
;
int
len
;
UINT
len
;
for
(
test
=
tests
;
test
->
path
;
test
++
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment