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
b0ea577a
Commit
b0ea577a
authored
Oct 20, 2006
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Avoid usage of sizeof in traces that causes warnings on MacOSX.
parent
344ce9e6
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
19 additions
and
26 deletions
+19
-26
style.c
dlls/dmstyle/style.c
+2
-2
imm.c
dlls/imm32/imm.c
+3
-6
computername.c
dlls/kernel32/computername.c
+1
-1
stg_prop.c
dlls/ole32/stg_prop.c
+6
-6
info.c
dlls/winspool.drv/info.c
+7
-11
No files found.
dlls/dmstyle/style.c
View file @
b0ea577a
...
...
@@ -598,7 +598,7 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartList (LPPERSISTSTR
IStream_Read
(
pStm
,
&
dwSize
,
sizeof
(
DWORD
),
NULL
);
cnt
=
(
Chunk
.
dwSize
-
sizeof
(
DWORD
));
TRACE_
(
dmfile
)(
" - dwSize: %u
\n
"
,
dwSize
);
TRACE_
(
dmfile
)(
" - cnt: %u (%u / %u)
\n
"
,
cnt
/
dwSize
,
(
Chunk
.
dwSize
-
sizeof
(
DWORD
)),
dwSize
);
TRACE_
(
dmfile
)(
" - cnt: %u (%u / %u)
\n
"
,
cnt
/
dwSize
,
(
DWORD
)(
Chunk
.
dwSize
-
sizeof
(
DWORD
)),
dwSize
);
if
(
cnt
%
dwSize
!=
0
)
{
ERR
(
"Invalid Array Size
\n
"
);
return
E_FAIL
;
...
...
@@ -614,7 +614,7 @@ static HRESULT IDirectMusicStyle8Impl_IPersistStream_ParsePartList (LPPERSISTSTR
IStream_Read
(
pStm
,
&
dwSize
,
sizeof
(
DWORD
),
NULL
);
cnt
=
(
Chunk
.
dwSize
-
sizeof
(
DWORD
));
TRACE_
(
dmfile
)(
" - dwSize: %u
\n
"
,
dwSize
);
TRACE_
(
dmfile
)(
" - cnt: %u (%u / %u)
\n
"
,
cnt
/
dwSize
,
(
Chunk
.
dwSize
-
sizeof
(
DWORD
)),
dwSize
);
TRACE_
(
dmfile
)(
" - cnt: %u (%u / %u)
\n
"
,
cnt
/
dwSize
,
(
DWORD
)(
Chunk
.
dwSize
-
sizeof
(
DWORD
)),
dwSize
);
if
(
cnt
%
dwSize
!=
0
)
{
ERR
(
"Invalid Array Size
\n
"
);
return
E_FAIL
;
...
...
dlls/imm32/imm.c
View file @
b0ea577a
...
...
@@ -520,8 +520,7 @@ LONG WINAPI ImmGetCompositionStringA(
}
else
if
(
dwIndex
==
GCS_COMPSTR
)
{
TRACE
(
"GSC_COMPSTR %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
/
sizeof
(
WCHAR
));
TRACE
(
"GSC_COMPSTR %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
);
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
data
->
dwCompStringLength
*
3
);
rc
=
WideCharToMultiByte
(
CP_ACP
,
0
,(
LPWSTR
)
data
->
CompositionString
,
...
...
@@ -533,8 +532,7 @@ LONG WINAPI ImmGetCompositionStringA(
}
else
if
(
dwIndex
==
GCS_COMPATTR
)
{
TRACE
(
"GSC_COMPATTR %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
/
sizeof
(
WCHAR
));
TRACE
(
"GSC_COMPATTR %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
);
rc
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPWSTR
)
data
->
CompositionString
,
data
->
dwCompStringLength
/
sizeof
(
WCHAR
),
NULL
,
...
...
@@ -549,8 +547,7 @@ LONG WINAPI ImmGetCompositionStringA(
}
else
if
(
dwIndex
==
GCS_COMPCLAUSE
)
{
TRACE
(
"GSC_COMPCLAUSE %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
/
sizeof
(
WCHAR
));
TRACE
(
"GSC_COMPCLAUSE %p %i
\n
"
,
data
->
CompositionString
,
data
->
dwCompStringLength
);
rc
=
WideCharToMultiByte
(
CP_ACP
,
0
,
(
LPWSTR
)
data
->
CompositionString
,
data
->
dwCompStringLength
/
sizeof
(
WCHAR
),
NULL
,
...
...
dlls/kernel32/computername.c
View file @
b0ea577a
...
...
@@ -276,7 +276,7 @@ void COMPUTERNAME_Init (void)
}
NtClose
(
hsubkey
);
TRACE
(
" ComputerName: %s (%u)
\n
"
,
debugstr_w
(
computer_name
),
len
/
sizeof
(
WCHAR
)
);
TRACE
(
" ComputerName: %s (%u)
\n
"
,
debugstr_w
(
computer_name
),
len
);
RtlInitUnicodeString
(
&
nameW
,
ActiveComputerNameW
);
if
(
(
st
=
NtCreateKey
(
&
hsubkey
,
KEY_ALL_ACCESS
,
&
attr
,
0
,
NULL
,
REG_OPTION_VOLATILE
,
NULL
)
)
...
...
dlls/ole32/stg_prop.c
View file @
b0ea577a
...
...
@@ -1603,9 +1603,9 @@ static HRESULT PropertyStorage_WriteDictionaryToStream(
*
sectionOffset
+=
closure
.
bytesWritten
;
if
(
closure
.
bytesWritten
%
sizeof
(
DWORD
))
{
TRACE
(
"adding %d bytes of padding
\n
"
,
sizeof
(
DWORD
)
-
closure
.
bytesWritten
%
sizeof
(
DWORD
)
);
*
sectionOffset
+=
sizeof
(
DWORD
)
-
closure
.
bytesWritten
%
sizeof
(
DWORD
)
;
DWORD
padding
=
sizeof
(
DWORD
)
-
closure
.
bytesWritten
%
sizeof
(
DWORD
);
TRACE
(
"adding %d bytes of padding
\n
"
,
padding
);
*
sectionOffset
+=
padding
;
}
end:
...
...
@@ -1744,9 +1744,9 @@ static HRESULT PropertyStorage_WritePropertyToStream(PropertyStorage_impl *This,
*
sectionOffset
+=
bytesWritten
;
if
(
bytesWritten
%
sizeof
(
DWORD
))
{
TRACE
(
"adding %d bytes of padding
\n
"
,
sizeof
(
DWORD
)
-
bytesWritten
%
sizeof
(
DWORD
)
);
*
sectionOffset
+=
sizeof
(
DWORD
)
-
bytesWritten
%
sizeof
(
DWORD
)
;
DWORD
padding
=
sizeof
(
DWORD
)
-
bytesWritten
%
sizeof
(
DWORD
);
TRACE
(
"adding %d bytes of padding
\n
"
,
padding
);
*
sectionOffset
+=
padding
;
}
}
...
...
dlls/winspool.drv/info.c
View file @
b0ea577a
...
...
@@ -954,9 +954,8 @@ static monitor_t * monitor_load(LPWSTR name, LPWSTR dllname)
pm
->
monitorUI
=
pInitializePrintMonitorUI
();
TRACE
(
"%p: MONITORUI from %s,InitializePrintMonitorUI()
\n
"
,
pm
->
monitorUI
,
debugstr_w
(
driver
));
if
(
pm
->
monitorUI
)
{
TRACE
(
"0x%08x: dwMonitorSize (%d) => %d Functions
\n
"
,
pm
->
monitorUI
->
dwMonitorUISize
,
pm
->
monitorUI
->
dwMonitorUISize
,
(
pm
->
monitorUI
->
dwMonitorUISize
-
sizeof
(
DWORD
)
)
/
sizeof
(
VOID
*
));
TRACE
(
"0x%08x: dwMonitorSize (%d)
\n
"
,
pm
->
monitorUI
->
dwMonitorUISize
,
pm
->
monitorUI
->
dwMonitorUISize
);
}
}
...
...
@@ -973,9 +972,7 @@ static monitor_t * monitor_load(LPWSTR name, LPWSTR dllname)
}
if
(
pm
->
monitor
)
{
TRACE
(
"0x%08x: dwMonitorSize (%d) => %d Functions
\n
"
,
pm
->
dwMonitorSize
,
pm
->
dwMonitorSize
,
(
pm
->
dwMonitorSize
)
/
sizeof
(
VOID
*
)
);
TRACE
(
"0x%08x: dwMonitorSize (%d)
\n
"
,
pm
->
dwMonitorSize
,
pm
->
dwMonitorSize
);
}
...
...
@@ -5078,8 +5075,7 @@ DWORD WINAPI EnumPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName,
lpValueName
=
HeapAlloc
(
hHeap
,
0
,
cbMaxValueNameLen
*
sizeof
(
WCHAR
));
if
(
lpValueName
==
NULL
)
{
ERR
(
"Failed to allocate %i bytes from process heap
\n
"
,
cbMaxValueNameLen
*
sizeof
(
WCHAR
));
ERR
(
"Failed to allocate %i WCHARs from process heap
\n
"
,
cbMaxValueNameLen
);
r
=
RegCloseKey
(
hkSubKey
);
if
(
r
!=
ERROR_SUCCESS
)
WARN
(
"RegCloseKey returned %i
\n
"
,
r
);
...
...
@@ -5122,9 +5118,9 @@ DWORD WINAPI EnumPrinterDataExW(HANDLE hPrinter, LPCWSTR pKeyName,
return
ret
;
}
TRACE
(
"%s [%i]: name needs %i
byte
s, data needs %i bytes
\n
"
,
TRACE
(
"%s [%i]: name needs %i
WCHAR
s, data needs %i bytes
\n
"
,
debugstr_w
(
lpValueName
),
dwIndex
,
(
cbValueNameLen
+
1
)
*
sizeof
(
WCHAR
)
,
cbValueLen
);
cbValueNameLen
+
1
,
cbValueLen
);
cbBufSize
+=
(
cbValueNameLen
+
1
)
*
sizeof
(
WCHAR
);
cbBufSize
+=
cbValueLen
;
...
...
@@ -5265,7 +5261,7 @@ DWORD WINAPI EnumPrinterDataExA(HANDLE hPrinter, LPCSTR pKeyName,
if
(
pKeyNameW
==
NULL
)
{
ERR
(
"Failed to allocate %i bytes from process heap
\n
"
,
(
LONG
)
len
*
sizeof
(
WCHAR
));
(
LONG
)(
len
*
sizeof
(
WCHAR
)
));
return
ERROR_OUTOFMEMORY
;
}
...
...
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