Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
BC
public
belr
Commits
81e83f99
Commit
81e83f99
authored
Apr 11, 2019
by
Simon Morlat
Browse files
Fix build issues with Visual Studio 2017
parent
06e4d63e
Changes
3
Hide whitespace changes
Inline
Side-by-side
CMakeLists.txt
View file @
81e83f99
...
...
@@ -43,6 +43,11 @@ include(CheckSymbolExists)
include
(
CMakePushCheckState
)
include
(
CheckCXXCompilerFlag
)
if
(
MSVC
)
add_definitions
(
-D_CRT_SECURE_NO_WARNINGS
)
endif
()
# find_package should be invoked here to check for libraries - however do NOT
# call include_directories here (see below)
...
...
tester/belr-tester.cpp
View file @
81e83f99
...
...
@@ -42,8 +42,8 @@ int main(int argc, char *argv[]) {
if
(
strstr
(
argv
[
0
],
".libs"
))
{
int
prefix_length
=
(
int
)(
strstr
(
argv
[
0
],
".libs"
)
-
argv
[
0
])
+
1
;
char
prefix
[
200
];
sprintf
(
prefix
,
"%s%.*s"
,
argv
[
0
][
0
]
==
'/'
?
""
:
"./"
,
prefix_length
,
argv
[
0
]);
char
prefix
[
200
]
=
{
0
}
;
s
n
printf
(
prefix
,
sizeof
(
prefix
)
-
1
,
"%s%.*s"
,
argv
[
0
][
0
]
==
'/'
?
""
:
"./"
,
prefix_length
,
argv
[
0
]);
bc_tester_set_resource_dir_prefix
(
prefix
);
bc_tester_set_writable_dir_prefix
(
prefix
);
}
...
...
tester/grammar-tester.cpp
View file @
81e83f99
...
...
@@ -41,7 +41,7 @@ static bool parseMessage(shared_ptr<Grammar> grammar, const string &message) {
shared_ptr
<
DebugElement
>
elem
=
parser
->
parseInput
(
"sip-message"
,
message
,
&
pos
);
BC_ASSERT_TRUE
(
elem
!=
nullptr
);
if
(
!
elem
)
return
FALSE
;
BC_ASSERT_EQUAL
(
pos
,
message
.
size
(),
int
,
"%i"
);
BC_ASSERT_EQUAL
(
(
int
)
pos
,
(
int
)
message
.
size
(),
int
,
"%i"
);
BC_ASSERT_TRUE
(
message
==
elem
->
getValue
());
return
message
.
size
()
==
pos
&&
message
==
elem
->
getValue
();
...
...
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