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
445588ba
Commit
445588ba
authored
Dec 04, 2008
by
Vincent Povirk
Committed by
Alexandre Julliard
Dec 05, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msxml3/tests: Fix string format warnings.
parent
6ff83ba5
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
28 deletions
+14
-28
xmldoc.c
dlls/msxml3/tests/xmldoc.c
+7
-14
xmlelem.c
dlls/msxml3/tests/xmlelem.c
+7
-14
No files found.
dlls/msxml3/tests/xmldoc.c
View file @
445588ba
...
...
@@ -31,27 +31,20 @@
/* Deprecated Error Code */
#define XML_E_INVALIDATROOTLEVEL 0xc00ce556
static
void
append_str
(
char
**
str
,
const
char
*
data
)
{
sprintf
(
*
str
,
data
);
*
str
+=
strlen
(
*
str
);
}
static
void
create_xml_file
(
LPCSTR
filename
)
{
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"<?xml version=
\"
1.0
\"
?>
\n
"
);
append_str
(
&
ptr
,
"<BankAccount>
\n
"
);
append_str
(
&
ptr
,
" <Number>1234</Number>
\n
"
);
append_str
(
&
ptr
,
" <Name>Captain Ahab</Name>
\n
"
);
append_str
(
&
ptr
,
"</BankAccount>"
);
static
const
char
data
[]
=
"<?xml version=
\"
1.0
\"
?>
\n
"
"<BankAccount>
\n
"
" <Number>1234</Number>
\n
"
" <Name>Captain Ahab</Name>
\n
"
"</BankAccount>"
;
WriteFile
(
hf
,
data
,
ptr
-
data
,
&
dwNumberOfBytesWritten
,
NULL
);
WriteFile
(
hf
,
data
,
sizeof
(
data
)
-
1
,
&
dwNumberOfBytesWritten
,
NULL
);
CloseHandle
(
hf
);
}
...
...
dlls/msxml3/tests/xmlelem.c
View file @
445588ba
...
...
@@ -228,27 +228,20 @@ static void test_xmlelem(void)
IXMLDocument_Release
(
doc
);
}
static
void
append_str
(
char
**
str
,
const
char
*
data
)
{
sprintf
(
*
str
,
data
);
*
str
+=
strlen
(
*
str
);
}
static
void
create_xml_file
(
LPCSTR
filename
)
{
char
data
[
1024
];
char
*
ptr
=
data
;
DWORD
dwNumberOfBytesWritten
;
HANDLE
hf
=
CreateFile
(
filename
,
GENERIC_WRITE
,
0
,
NULL
,
CREATE_ALWAYS
,
FILE_ATTRIBUTE_NORMAL
,
NULL
);
append_str
(
&
ptr
,
"<?xml version=
\"
1.0
\"
?>
\n
"
);
append_str
(
&
ptr
,
"<BankAccount>
\n
"
);
append_str
(
&
ptr
,
" <Number>1234</Number>
\n
"
);
append_str
(
&
ptr
,
" <Name>Captain Ahab</Name>
\n
"
);
append_str
(
&
ptr
,
"</BankAccount>
\n
"
);
static
const
char
data
[]
=
"<?xml version=
\"
1.0
\"
?>
\n
"
"<BankAccount>
\n
"
" <Number>1234</Number>
\n
"
" <Name>Captain Ahab</Name>
\n
"
"</BankAccount>
\n
"
;
WriteFile
(
hf
,
data
,
ptr
-
data
,
&
dwNumberOfBytesWritten
,
NULL
);
WriteFile
(
hf
,
data
,
sizeof
(
data
)
-
1
,
&
dwNumberOfBytesWritten
,
NULL
);
CloseHandle
(
hf
);
}
...
...
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