Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
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-winehq
Commits
f7385699
Commit
f7385699
authored
Feb 01, 2011
by
Andrew Nguyen
Committed by
Alexandre Julliard
Feb 01, 2011
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll/tests: Avoid casting away const in comparison functions.
parent
39eb51f9
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
9 deletions
+19
-9
string.c
dlls/ntdll/tests/string.c
+19
-9
No files found.
dlls/ntdll/tests/string.c
View file @
f7385699
...
...
@@ -1143,22 +1143,32 @@ static void test_wcsrchr(void)
"wcsrchr should have returned NULL
\n
"
);
}
static
__cdecl
int
intcomparefunc
(
const
void
*
a
,
const
void
*
b
)
static
__cdecl
int
intcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
(
*
(
int
*
)
a
)
-
(
*
(
int
*
)
b
);
const
int
*
p
=
a
,
*
q
=
b
;
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
*
p
-
*
q
;
}
static
__cdecl
int
charcomparefunc
(
const
void
*
a
,
const
void
*
b
)
static
__cdecl
int
charcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
(
*
(
char
*
)
a
)
-
(
*
(
char
*
)
b
);
const
char
*
p
=
a
,
*
q
=
b
;
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
*
p
-
*
q
;
}
static
__cdecl
int
strcomparefunc
(
const
void
*
a
,
const
void
*
b
)
static
__cdecl
int
strcomparefunc
(
const
void
*
a
,
const
void
*
b
)
{
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
lstrcmpA
(
*
(
char
**
)
a
,
*
(
char
**
)
b
);
const
char
*
const
*
p
=
a
;
const
char
*
const
*
q
=
b
;
ok
(
a
!=
b
,
"must never get the same pointer
\n
"
);
return
lstrcmpA
(
*
p
,
*
q
);
}
static
void
test_qsort
(
void
)
...
...
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