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
1c66c611
Commit
1c66c611
authored
Jun 13, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernel32: Don't use sizeof in traces to avoid printf format warnings.
parent
bc99ac09
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
8 deletions
+6
-8
format_msg.c
dlls/kernel/format_msg.c
+4
-6
toolhelp.c
dlls/kernel/toolhelp.c
+2
-2
No files found.
dlls/kernel/format_msg.c
View file @
1c66c611
...
@@ -138,6 +138,7 @@ DWORD WINAPI FormatMessageA(
...
@@ -138,6 +138,7 @@ DWORD WINAPI FormatMessageA(
va_list
*
_args
)
va_list
*
_args
)
{
{
LPDWORD
args
=
(
LPDWORD
)
_args
;
LPDWORD
args
=
(
LPDWORD
)
_args
;
DWORD
ret
=
0
;
#if defined(__i386__) || defined(__sparc__)
#if defined(__i386__) || defined(__sparc__)
/* This implementation is completely dependent on the format of the va_list on x86 CPUs */
/* This implementation is completely dependent on the format of the va_list on x86 CPUs */
LPSTR
target
,
t
;
LPSTR
target
,
t
;
...
@@ -331,13 +332,10 @@ DWORD WINAPI FormatMessageA(
...
@@ -331,13 +332,10 @@ DWORD WINAPI FormatMessageA(
}
}
HeapFree
(
GetProcessHeap
(),
0
,
target
);
HeapFree
(
GetProcessHeap
(),
0
,
target
);
HeapFree
(
GetProcessHeap
(),
0
,
from
);
HeapFree
(
GetProcessHeap
(),
0
,
from
);
TRACE
(
"-- returning %d
\n
"
,
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
?
strlen
(
*
(
LPSTR
*
)
lpBuffer
)
:
strlen
(
lpBuffer
));
ret
=
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
?
strlen
(
*
(
LPSTR
*
)
lpBuffer
)
:
strlen
(
lpBuffer
);
return
(
dwFlags
&
FORMAT_MESSAGE_ALLOCATE_BUFFER
)
?
strlen
(
*
(
LPSTR
*
)
lpBuffer
)
:
strlen
(
lpBuffer
);
#else
return
0
;
#endif
/* __i386__ */
#endif
/* __i386__ */
TRACE
(
"-- returning %ld
\n
"
,
ret
);
return
ret
;
}
}
#undef ADD_TO_T
#undef ADD_TO_T
...
...
dlls/kernel/toolhelp.c
View file @
1c66c611
...
@@ -501,7 +501,7 @@ static BOOL module_nextW( HANDLE hSnapShot, LPMODULEENTRY32W lpme, BOOL first )
...
@@ -501,7 +501,7 @@ static BOOL module_nextW( HANDLE hSnapShot, LPMODULEENTRY32W lpme, BOOL first )
if
(
lpme
->
dwSize
<
sizeof
(
MODULEENTRY32W
))
if
(
lpme
->
dwSize
<
sizeof
(
MODULEENTRY32W
))
{
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
WARN
(
"Result buffer too small (
req: %d, was: %ld)
\n
"
,
sizeof
(
MODULEENTRY32W
)
,
lpme
->
dwSize
);
WARN
(
"Result buffer too small (
was: %ld)
\n
"
,
lpme
->
dwSize
);
return
FALSE
;
return
FALSE
;
}
}
if
((
snap
=
MapViewOfFile
(
hSnapShot
,
FILE_MAP_ALL_ACCESS
,
0
,
0
,
0
)))
if
((
snap
=
MapViewOfFile
(
hSnapShot
,
FILE_MAP_ALL_ACCESS
,
0
,
0
,
0
)))
...
@@ -553,7 +553,7 @@ static BOOL module_nextA( HANDLE handle, LPMODULEENTRY32 lpme, BOOL first )
...
@@ -553,7 +553,7 @@ static BOOL module_nextA( HANDLE handle, LPMODULEENTRY32 lpme, BOOL first )
if
(
lpme
->
dwSize
<
sizeof
(
MODULEENTRY32
))
if
(
lpme
->
dwSize
<
sizeof
(
MODULEENTRY32
))
{
{
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
SetLastError
(
ERROR_INSUFFICIENT_BUFFER
);
WARN
(
"Result buffer too small (
req: %d, was: %ld)
\n
"
,
sizeof
(
MODULEENTRY32
)
,
lpme
->
dwSize
);
WARN
(
"Result buffer too small (
was: %ld)
\n
"
,
lpme
->
dwSize
);
return
FALSE
;
return
FALSE
;
}
}
...
...
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