Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
CMake
CMake
Commits
781a1eaa
Commit
781a1eaa
authored
May 03, 2004
by
Bill Hoffman
Browse files
ENH: fix warnings in test
parent
ee9f9255
Changes
2
Hide whitespace changes
Inline
Side-by-side
Tests/LoadCommand/CMakeCommands/cmTestCommand.c
View file @
781a1eaa
...
...
@@ -13,7 +13,8 @@ typedef struct
static
int
InitialPass
(
void
*
inf
,
void
*
mf
,
int
argc
,
char
*
argv
[])
{
char
*
file
;
const
char
*
str
;
char
*
str
;
const
char
*
cstr
;
char
buffer
[
1024
];
void
*
source_file
;
cmLoadedCommandInfo
*
info
=
(
cmLoadedCommandInfo
*
)
inf
;
...
...
@@ -93,19 +94,19 @@ static int InitialPass(void *inf, void *mf, int argc, char *argv[])
info
->
CAPI
->
AddDefineFlag
(
mf
,
"-DADDED_DEFINITION"
);
source_file
=
info
->
CAPI
->
CreateSourceFile
();
str
=
info
->
CAPI
->
SourceFileGetSourceName
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file name): [%s]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetSourceName
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file name): [%s]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
str
=
info
->
CAPI
->
SourceFileGetFullPath
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file full path): [%s]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetFullPath
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file full path): [%s]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
if
(
info
->
CAPI
->
SourceFileGetPropertyAsBool
(
source_file
,
"SOME_PROPERTY"
)
)
{
info
->
CAPI
->
SetError
(
mf
,
"Property SOME_PROPERTY should not be defined"
);
return
0
;
}
str
=
info
->
CAPI
->
SourceFileGetProperty
(
source_file
,
"ABSTRACT"
);
sprintf
(
buffer
,
"Shold be 0 (source file abstract property): [%p]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetProperty
(
source_file
,
"ABSTRACT"
);
sprintf
(
buffer
,
"Shold be 0 (source file abstract property): [%p]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
info
->
CAPI
->
DestroySourceFile
(
source_file
);
...
...
Tests/LoadCommandOneConfig/CMakeCommands/cmTestCommand.c
View file @
781a1eaa
...
...
@@ -13,7 +13,8 @@ typedef struct
static
int
InitialPass
(
void
*
inf
,
void
*
mf
,
int
argc
,
char
*
argv
[])
{
char
*
file
;
const
char
*
str
;
char
*
str
;
const
char
*
cstr
;
char
buffer
[
1024
];
void
*
source_file
;
cmLoadedCommandInfo
*
info
=
(
cmLoadedCommandInfo
*
)
inf
;
...
...
@@ -93,19 +94,19 @@ static int InitialPass(void *inf, void *mf, int argc, char *argv[])
info
->
CAPI
->
AddDefineFlag
(
mf
,
"-DADDED_DEFINITION"
);
source_file
=
info
->
CAPI
->
CreateSourceFile
();
str
=
info
->
CAPI
->
SourceFileGetSourceName
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file name): [%s]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetSourceName
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file name): [%s]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
str
=
info
->
CAPI
->
SourceFileGetFullPath
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file full path): [%s]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetFullPath
(
source_file
);
sprintf
(
buffer
,
"Shold be empty (source file full path): [%s]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
if
(
info
->
CAPI
->
SourceFileGetPropertyAsBool
(
source_file
,
"SOME_PROPERTY"
)
)
{
info
->
CAPI
->
SetError
(
mf
,
"Property SOME_PROPERTY should not be defined"
);
return
0
;
}
str
=
info
->
CAPI
->
SourceFileGetProperty
(
source_file
,
"ABSTRACT"
);
sprintf
(
buffer
,
"Shold be 0 (source file abstract property): [%p]"
,
str
);
c
str
=
info
->
CAPI
->
SourceFileGetProperty
(
source_file
,
"ABSTRACT"
);
sprintf
(
buffer
,
"Shold be 0 (source file abstract property): [%p]"
,
c
str
);
info
->
CAPI
->
DisplaySatus
(
mf
,
buffer
);
info
->
CAPI
->
DestroySourceFile
(
source_file
);
...
...
Write
Preview
Supports
Markdown
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