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
2b8f11b8
Commit
2b8f11b8
authored
Mar 27, 2010
by
Mikhail Maroukhine
Committed by
Alexandre Julliard
Mar 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ntdll: Fix compiler warnings with flag -Wcast-qual.
parent
88cca2cf
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
heap.c
dlls/ntdll/heap.c
+4
-4
loader.c
dlls/ntdll/loader.c
+2
-2
rtlstr.c
dlls/ntdll/rtlstr.c
+1
-1
No files found.
dlls/ntdll/heap.c
View file @
2b8f11b8
...
...
@@ -1261,15 +1261,15 @@ static BOOL HEAP_ValidateInUseArena( const SUBHEAP *subheap, const ARENA_INUSE *
/* Check unused bytes */
if
(
pArena
->
magic
==
ARENA_PENDING_MAGIC
)
{
DWORD
*
ptr
=
(
DWORD
*
)(
pArena
+
1
);
DWORD
*
end
=
(
DWORD
*
)((
char
*
)
ptr
+
size
);
const
DWORD
*
ptr
=
(
const
DWORD
*
)(
pArena
+
1
);
const
DWORD
*
end
=
(
const
DWORD
*
)((
const
char
*
)
ptr
+
size
);
while
(
ptr
<
end
)
{
if
(
*
ptr
!=
ARENA_FREE_FILLER
)
{
ERR
(
"Heap %p: free block %p overwritten at %p by %08x
\n
"
,
subheap
->
heap
,
(
ARENA_INUSE
*
)
pArena
+
1
,
ptr
,
*
ptr
);
subheap
->
heap
,
(
const
ARENA_INUSE
*
)
pArena
+
1
,
ptr
,
*
ptr
);
if
(
!*
ptr
)
{
HEAP_Dump
(
subheap
->
heap
);
DbgBreakPoint
();
}
return
FALSE
;
}
...
...
@@ -1398,7 +1398,7 @@ static BOOL validate_block_pointer( HEAP *heap, SUBHEAP **ret_subheap, const ARE
return
TRUE
;
}
if
((
char
*
)
arena
<
(
char
*
)
subheap
->
base
+
subheap
->
headerSize
)
if
((
c
onst
c
har
*
)
arena
<
(
char
*
)
subheap
->
base
+
subheap
->
headerSize
)
WARN
(
"Heap %p: pointer %p is inside subheap %p header
\n
"
,
subheap
->
heap
,
arena
+
1
,
subheap
);
else
if
(
subheap
->
heap
->
flags
&
HEAP_VALIDATE
)
/* do the full validation */
ret
=
HEAP_ValidateInUseArena
(
subheap
,
arena
,
QUIET
);
...
...
dlls/ntdll/loader.c
View file @
2b8f11b8
...
...
@@ -2688,7 +2688,7 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
if
(
!
(
nt
=
RtlImageNtHeader
(
module
)))
return
NULL
;
if
(
nt
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR64_MAGIC
)
{
const
IMAGE_NT_HEADERS64
*
nt64
=
(
IMAGE_NT_HEADERS64
*
)
nt
;
const
IMAGE_NT_HEADERS64
*
nt64
=
(
const
IMAGE_NT_HEADERS64
*
)
nt
;
if
(
dir
>=
nt64
->
OptionalHeader
.
NumberOfRvaAndSizes
)
return
NULL
;
if
(
!
(
addr
=
nt64
->
OptionalHeader
.
DataDirectory
[
dir
].
VirtualAddress
))
return
NULL
;
...
...
@@ -2697,7 +2697,7 @@ PVOID WINAPI RtlImageDirectoryEntryToData( HMODULE module, BOOL image, WORD dir,
}
else
if
(
nt
->
OptionalHeader
.
Magic
==
IMAGE_NT_OPTIONAL_HDR32_MAGIC
)
{
const
IMAGE_NT_HEADERS32
*
nt32
=
(
IMAGE_NT_HEADERS32
*
)
nt
;
const
IMAGE_NT_HEADERS32
*
nt32
=
(
const
IMAGE_NT_HEADERS32
*
)
nt
;
if
(
dir
>=
nt32
->
OptionalHeader
.
NumberOfRvaAndSizes
)
return
NULL
;
if
(
!
(
addr
=
nt32
->
OptionalHeader
.
DataDirectory
[
dir
].
VirtualAddress
))
return
NULL
;
...
...
dlls/ntdll/rtlstr.c
View file @
2b8f11b8
...
...
@@ -1617,7 +1617,7 @@ BOOLEAN WINAPI RtlIsTextUnicode( LPCVOID buf, INT len, INT *pf )
/* Check for an odd length ... pass if even. */
if
(
len
&
1
)
out_flags
|=
IS_TEXT_UNICODE_ODD_LENGTH
;
if
(((
char
*
)
buf
)[
len
-
1
]
==
0
)
if
(((
c
onst
c
har
*
)
buf
)[
len
-
1
]
==
0
)
len
--
;
/* Windows seems to do something like that to avoid e.g. false IS_TEXT_UNICODE_NULL_BYTES */
len
/=
sizeof
(
WCHAR
);
...
...
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