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
6e5dfd1f
Commit
6e5dfd1f
authored
Mar 27, 2010
by
Mikhail Maroukhine
Committed by
Alexandre Julliard
Mar 29, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
wininet: Fix compiler warnings with flag -Wcast-qual.
parent
f930c87f
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
20 deletions
+20
-20
urlcache.c
dlls/wininet/urlcache.c
+20
-20
No files found.
dlls/wininet/urlcache.c
View file @
6e5dfd1f
...
...
@@ -986,9 +986,9 @@ static DWORD URLCache_CopyEntry(
ZeroMemory
((
LPBYTE
)
lpCacheEntryInfo
+
dwRequiredSize
,
4
-
(
dwRequiredSize
%
4
));
dwRequiredSize
=
DWORD_ALIGN
(
dwRequiredSize
);
if
(
bUnicode
)
lenUrl
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
-
1
,
NULL
,
0
);
lenUrl
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
-
1
,
NULL
,
0
);
else
lenUrl
=
strlen
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
);
lenUrl
=
strlen
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
);
dwRequiredSize
+=
(
lenUrl
+
1
)
*
(
bUnicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
));
/* FIXME: is source url optional? */
...
...
@@ -998,9 +998,9 @@ static DWORD URLCache_CopyEntry(
lpCacheEntryInfo
->
lpszSourceUrlName
=
(
LPSTR
)
lpCacheEntryInfo
+
dwRequiredSize
-
lenUrlBytes
;
if
(
bUnicode
)
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
-
1
,
(
LPWSTR
)
lpCacheEntryInfo
->
lpszSourceUrlName
,
lenUrl
+
1
);
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
-
1
,
(
LPWSTR
)
lpCacheEntryInfo
->
lpszSourceUrlName
,
lenUrl
+
1
);
else
memcpy
(
lpCacheEntryInfo
->
lpszSourceUrlName
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
lenUrlBytes
);
memcpy
(
lpCacheEntryInfo
->
lpszSourceUrlName
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
,
lenUrlBytes
);
}
if
((
dwRequiredSize
%
4
)
&&
(
dwRequiredSize
<
*
lpdwBufferSize
))
...
...
@@ -1029,7 +1029,7 @@ static DWORD URLCache_CopyEntry(
if
(
*
lpdwBufferSize
>=
dwRequiredSize
)
{
lpCacheEntryInfo
->
lpHeaderInfo
=
(
LPBYTE
)
lpCacheEntryInfo
+
dwRequiredSize
-
pUrlEntry
->
dwHeaderInfoSize
-
1
;
memcpy
(
lpCacheEntryInfo
->
lpHeaderInfo
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
,
pUrlEntry
->
dwHeaderInfoSize
);
memcpy
(
lpCacheEntryInfo
->
lpHeaderInfo
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
,
pUrlEntry
->
dwHeaderInfoSize
);
((
LPBYTE
)
lpCacheEntryInfo
)[
dwRequiredSize
-
1
]
=
'\0'
;
}
if
((
dwRequiredSize
%
4
)
&&
(
dwRequiredSize
<
*
lpdwBufferSize
))
...
...
@@ -1041,18 +1041,18 @@ static DWORD URLCache_CopyEntry(
int
lenExtension
;
if
(
bUnicode
)
lenExtension
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
-
1
,
NULL
,
0
);
lenExtension
=
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
-
1
,
NULL
,
0
);
else
lenExtension
=
strlen
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
)
+
1
;
lenExtension
=
strlen
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
)
+
1
;
dwRequiredSize
+=
lenExtension
*
(
bUnicode
?
sizeof
(
WCHAR
)
:
sizeof
(
CHAR
));
if
(
*
lpdwBufferSize
>=
dwRequiredSize
)
{
lpCacheEntryInfo
->
lpszFileExtension
=
(
LPSTR
)
lpCacheEntryInfo
+
dwRequiredSize
-
lenExtension
;
if
(
bUnicode
)
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
-
1
,
(
LPWSTR
)
lpCacheEntryInfo
->
lpszSourceUrlName
,
lenExtension
);
MultiByteToWideChar
(
CP_ACP
,
0
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
-
1
,
(
LPWSTR
)
lpCacheEntryInfo
->
lpszSourceUrlName
,
lenExtension
);
else
memcpy
(
lpCacheEntryInfo
->
lpszFileExtension
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
lenExtension
*
sizeof
(
CHAR
));
memcpy
(
lpCacheEntryInfo
->
lpszFileExtension
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetFileExtension
,
lenExtension
*
sizeof
(
CHAR
));
}
if
((
dwRequiredSize
%
4
)
&&
(
dwRequiredSize
<
*
lpdwBufferSize
))
...
...
@@ -1557,15 +1557,15 @@ BOOL WINAPI GetUrlCacheEntryInfoA(
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LPSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LP
C
STR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
pUrlEntry
=
(
const
URL_CACHEFILE_ENTRY
*
)
pEntry
;
TRACE
(
"Found URL: %s
\n
"
,
debugstr_a
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
));
TRACE
(
"Found URL: %s
\n
"
,
debugstr_a
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
));
if
(
pUrlEntry
->
dwOffsetHeaderInfo
)
TRACE
(
"Header info: %s
\n
"
,
debugstr_a
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
));
TRACE
(
"Header info: %s
\n
"
,
debugstr_a
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
));
if
(
lpdwCacheEntryInfoBufferSize
)
{
...
...
@@ -1639,14 +1639,14 @@ BOOL WINAPI GetUrlCacheEntryInfoW(LPCWSTR lpszUrl,
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LPSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LP
C
STR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
pUrlEntry
=
(
const
URL_CACHEFILE_ENTRY
*
)
pEntry
;
TRACE
(
"Found URL: %s
\n
"
,
debugstr_a
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
));
TRACE
(
"Header info: %s
\n
"
,
debugstr_a
((
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
));
TRACE
(
"Found URL: %s
\n
"
,
debugstr_a
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
));
TRACE
(
"Header info: %s
\n
"
,
debugstr_a
((
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
));
if
(
lpdwCacheEntryInfoBufferSize
)
{
...
...
@@ -3265,9 +3265,9 @@ BOOL WINAPI FindNextUrlCacheEntryA(
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
continue
;
pUrlEntry
=
(
URL_CACHEFILE_ENTRY
*
)
pEntry
;
TRACE
(
"Found URL: %s
\n
"
,
(
LPSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
);
TRACE
(
"Header info: %s
\n
"
,
(
LP
BYTE
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
);
pUrlEntry
=
(
const
URL_CACHEFILE_ENTRY
*
)
pEntry
;
TRACE
(
"Found URL: %s
\n
"
,
(
LP
C
STR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetUrl
);
TRACE
(
"Header info: %s
\n
"
,
(
LP
CSTR
)
pUrlEntry
+
pUrlEntry
->
dwOffsetHeaderInfo
);
error
=
URLCache_CopyEntry
(
pContainer
,
...
...
@@ -3563,7 +3563,7 @@ BOOL WINAPI IsUrlCacheEntryExpiredA( LPCSTR url, DWORD dwFlags, FILETIME* pftLas
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LPSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LP
C
STR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
return
FALSE
;
}
...
...
@@ -3625,7 +3625,7 @@ BOOL WINAPI IsUrlCacheEntryExpiredW( LPCWSTR url, DWORD dwFlags, FILETIME* pftLa
if
(
pEntry
->
dwSignature
!=
URL_SIGNATURE
)
{
URLCacheContainer_UnlockIndex
(
pContainer
,
pHeader
);
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LPSTR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
FIXME
(
"Trying to retrieve entry of unknown format %s
\n
"
,
debugstr_an
((
LP
C
STR
)
&
pEntry
->
dwSignature
,
sizeof
(
DWORD
)));
SetLastError
(
ERROR_FILE_NOT_FOUND
);
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