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
3f1c2d5e
Commit
3f1c2d5e
authored
Mar 28, 2010
by
Mikhail Maroukhine
Committed by
Alexandre Julliard
Mar 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
tools: Fix compiler warnings with flag -Wcast-qual.
parent
93d9d8a3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
24 deletions
+24
-24
emf.c
tools/winedump/emf.c
+3
-3
msc.c
tools/winedump/msc.c
+10
-10
pe.c
tools/winedump/pe.c
+11
-11
No files found.
tools/winedump/emf.c
View file @
3f1c2d5e
...
...
@@ -171,16 +171,16 @@ static int dump_emfrecord(void)
case
EMR_EXTSELECTCLIPRGN
:
{
const
EMREXTSELECTCLIPRGN
*
clip
=
PRD
(
offset
,
sizeof
(
*
clip
));
const
RGNDATA
*
data
=
(
RGNDATA
*
)
clip
->
RgnData
;
const
RGNDATA
*
data
=
(
const
RGNDATA
*
)
clip
->
RgnData
;
DWORD
i
,
rc_count
=
0
;
RECT
*
rc
;
const
RECT
*
rc
;
if
(
length
>=
sizeof
(
*
clip
)
+
sizeof
(
*
data
))
rc_count
=
data
->
rdh
.
nCount
;
printf
(
"%-20s %08x
\n
"
,
"EMREXTSELECTCLIPRGN"
,
length
);
printf
(
"mode %d, rects %d
\n
"
,
clip
->
iMode
,
rc_count
);
for
(
i
=
0
,
rc
=
(
RECT
*
)
data
->
Buffer
;
i
<
rc_count
;
i
++
,
rc
++
)
for
(
i
=
0
,
rc
=
(
const
RECT
*
)
data
->
Buffer
;
i
<
rc_count
;
i
++
,
rc
++
)
printf
(
" (%d,%d)-(%d,%d)"
,
rc
->
left
,
rc
->
top
,
rc
->
right
,
rc
->
bottom
);
if
(
rc_count
!=
0
)
printf
(
"
\n
"
);
break
;
...
...
tools/winedump/msc.c
View file @
3f1c2d5e
...
...
@@ -1331,26 +1331,26 @@ int codeview_dump_symbols(const void* root, unsigned long size)
case
S_SECTINFO_V3
:
printf
(
"
\t
SSection Info: seg=%04x ?=%04x rva=%08x size=%08x attr=%08x %s
\n
"
,
*
(
unsigned
short
*
)((
const
char
*
)
sym
+
4
),
*
(
unsigned
short
*
)((
const
char
*
)
sym
+
6
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
8
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
12
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
16
),
*
(
const
unsigned
short
*
)((
const
char
*
)
sym
+
4
),
*
(
const
unsigned
short
*
)((
const
char
*
)
sym
+
6
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
8
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
12
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
16
),
(
const
char
*
)
sym
+
20
);
break
;
case
S_SUBSECTINFO_V3
:
printf
(
"
\t
SSubSection Info: addr=%04x:%08x size=%08x attr=%08x %s
\n
"
,
*
(
unsigned
short
*
)((
const
char
*
)
sym
+
16
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
12
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
4
),
*
(
unsigned
*
)((
const
char
*
)
sym
+
8
),
*
(
const
unsigned
short
*
)((
const
char
*
)
sym
+
16
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
12
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
4
),
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
8
),
(
const
char
*
)
sym
+
18
);
break
;
case
S_ENTRYPOINT_V3
:
printf
(
"
\t
SEntryPoint: id=%x '%s'
\n
"
,
*
(
unsigned
*
)((
const
char
*
)
sym
+
4
),
(
const
char
*
)
sym
+
8
);
*
(
const
unsigned
*
)((
const
char
*
)
sym
+
4
),
(
const
char
*
)
sym
+
8
);
break
;
default:
...
...
tools/winedump/pe.c
View file @
3f1c2d5e
...
...
@@ -377,7 +377,7 @@ void dump_section(const IMAGE_SECTION_HEADER *sectHead, const char* strtable)
/* long section name ? */
if
(
strtable
&&
sectHead
->
Name
[
0
]
==
'/'
&&
((
offset
=
atoi
((
const
char
*
)
sectHead
->
Name
+
1
))
<
*
(
DWORD
*
)
strtable
))
((
offset
=
atoi
((
const
char
*
)
sectHead
->
Name
+
1
))
<
*
(
const
DWORD
*
)
strtable
))
printf
(
" %.8s (%s)"
,
sectHead
->
Name
,
strtable
+
offset
);
else
printf
(
" %-8.8s"
,
sectHead
->
Name
);
...
...
@@ -589,7 +589,7 @@ static void dump_x86_64_unwind_info( const struct runtime_function *function )
{
"rax"
,
"rcx"
,
"rdx"
,
"rbx"
,
"rsp"
,
"rbp"
,
"rsi"
,
"rdi"
,
"r8"
,
"r9"
,
"r10"
,
"r11"
,
"r12"
,
"r13"
,
"r14"
,
"r15"
};
union
handler_data
*
handler_data
;
const
union
handler_data
*
handler_data
;
const
struct
unwind_info
*
info
;
unsigned
int
i
,
count
;
...
...
@@ -629,12 +629,12 @@ static void dump_x86_64_unwind_info( const struct runtime_function *function )
case
UWOP_ALLOC_LARGE
:
if
(
info
->
opcodes
[
i
].
info
)
{
count
=
*
(
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
count
=
*
(
const
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
i
+=
2
;
}
else
{
count
=
*
(
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
8
;
count
=
*
(
const
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
8
;
i
++
;
}
printf
(
"sub $0x%x,%%rsp
\n
"
,
count
);
...
...
@@ -648,22 +648,22 @@ static void dump_x86_64_unwind_info( const struct runtime_function *function )
info
->
frame_offset
*
16
,
reg_names
[
info
->
frame_reg
]
);
break
;
case
UWOP_SAVE_NONVOL
:
count
=
*
(
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
8
;
count
=
*
(
const
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
8
;
printf
(
"mov %%%s,0x%x(%%rsp)
\n
"
,
reg_names
[
info
->
opcodes
[
i
].
info
],
count
);
i
++
;
break
;
case
UWOP_SAVE_NONVOL_FAR
:
count
=
*
(
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
count
=
*
(
const
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
printf
(
"mov %%%s,0x%x(%%rsp)
\n
"
,
reg_names
[
info
->
opcodes
[
i
].
info
],
count
);
i
+=
2
;
break
;
case
UWOP_SAVE_XMM128
:
count
=
*
(
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
16
;
count
=
*
(
const
USHORT
*
)
&
info
->
opcodes
[
i
+
1
]
*
16
;
printf
(
"movaps %%xmm%u,0x%x(%%rsp)
\n
"
,
info
->
opcodes
[
i
].
info
,
count
);
i
++
;
break
;
case
UWOP_SAVE_XMM128_FAR
:
count
=
*
(
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
count
=
*
(
const
DWORD
*
)
&
info
->
opcodes
[
i
+
1
];
printf
(
"movaps %%xmm%u,0x%x(%%rsp)
\n
"
,
info
->
opcodes
[
i
].
info
,
count
);
i
+=
2
;
break
;
...
...
@@ -676,7 +676,7 @@ static void dump_x86_64_unwind_info( const struct runtime_function *function )
}
}
handler_data
=
(
union
handler_data
*
)
&
info
->
opcodes
[(
info
->
count
+
1
)
&
~
1
];
handler_data
=
(
const
union
handler_data
*
)
&
info
->
opcodes
[(
info
->
count
+
1
)
&
~
1
];
if
(
info
->
flags
&
UNW_FLAG_CHAININFO
)
{
printf
(
" -> function %08x-%08x
\n
"
,
...
...
@@ -685,7 +685,7 @@ static void dump_x86_64_unwind_info( const struct runtime_function *function )
}
if
(
info
->
flags
&
(
UNW_FLAG_EHANDLER
|
UNW_FLAG_UHANDLER
))
printf
(
" handler %08x data at %08x
\n
"
,
handler_data
->
handler
,
(
ULONG
)(
function
->
UnwindData
+
(
c
har
*
)(
&
handler_data
->
handler
+
1
)
-
(
char
*
)
info
));
(
ULONG
)(
function
->
UnwindData
+
(
c
onst
char
*
)(
&
handler_data
->
handler
+
1
)
-
(
const
char
*
)
info
));
}
static
void
dump_dir_exceptions
(
void
)
...
...
@@ -995,7 +995,7 @@ static void dump_dir_reloc(void)
unsigned
int
i
,
size
=
0
;
const
USHORT
*
relocs
;
const
IMAGE_BASE_RELOCATION
*
rel
=
get_dir_and_size
(
IMAGE_DIRECTORY_ENTRY_BASERELOC
,
&
size
);
const
IMAGE_BASE_RELOCATION
*
end
=
(
IMAGE_BASE_RELOCATION
*
)((
char
*
)
rel
+
size
);
const
IMAGE_BASE_RELOCATION
*
end
=
(
const
IMAGE_BASE_RELOCATION
*
)((
const
char
*
)
rel
+
size
);
static
const
char
*
const
names
[]
=
{
"BASED_ABSOLUTE"
,
...
...
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