Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
FORMUS3IC_LAS3
/
embb
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
9e5cecd4
authored
Feb 17, 2016
by
Marcus Winter
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'embb543_vs2015_warnings' into development
parents
e456f46c
7e7ad05b
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
24 additions
and
14 deletions
+24
-14
CMakeCommon/SetCompilerFlags.cmake
+9
-0
containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h
+2
-2
containers_cpp/test/hazard_pointer_test.cc
+1
-1
containers_cpp/test/pool_test-inl.h
+0
-1
doc/examples/containers/queues-snippet.h
+3
-2
doc/examples/containers/stack-snippet.h
+3
-2
mtapi_c/test/embb_mtapi_test_task.cc
+6
-6
No files found.
CMakeCommon/SetCompilerFlags.cmake
View file @
9e5cecd4
...
@@ -90,10 +90,19 @@ function(SetVisualStudioCompilerFlags)
...
@@ -90,10 +90,19 @@ function(SetVisualStudioCompilerFlags)
# Locally suppressed warnings (should not be globally suppressed):
# Locally suppressed warnings (should not be globally suppressed):
# 4640 -> Information that local static variable initialization is not
# 4640 -> Information that local static variable initialization is not
# thread-safe.
# thread-safe.
#
# VS 2015 specific warnings:
# 5026 -> Move constructor was implicitly defined as deleted
# 5027 -> Move assignment operator was implicitly defined as deleted
#
set
(
warning_flags
"/Wall /wd4820 /wd4514 /wd4668 /wd4710 /wd4350 /wd4571 /wd4625 /wd4626 /wd4711 /wd4255"
)
set
(
warning_flags
"/Wall /wd4820 /wd4514 /wd4668 /wd4710 /wd4350 /wd4571 /wd4625 /wd4626 /wd4711 /wd4255"
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
if
(
WARNINGS_ARE_ERRORS STREQUAL ON
)
set
(
warning_flags
"
${
warning_flags
}
/WX"
)
set
(
warning_flags
"
${
warning_flags
}
/WX"
)
endif
()
endif
()
string
(
FIND
"
${
CMAKE_GENERATOR
}
"
"Visual Studio 14 2015"
vs2015_state
)
if
(
vs2015_state EQUAL 0
)
set
(
warning_flags
"
${
warning_flags
}
/wd5026 /wd5027"
)
endif
()
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
warning_flags
}
"
PARENT_SCOPE
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
${
warning_flags
}
"
PARENT_SCOPE
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
warning_flags
}
"
PARENT_SCOPE
)
set
(
CMAKE_C_FLAGS
"
${
CMAKE_C_FLAGS
}
${
warning_flags
}
"
PARENT_SCOPE
)
endif
()
endif
()
...
...
containers_cpp/include/embb/containers/internal/lock_free_stack-inl.h
View file @
9e5cecd4
...
@@ -46,8 +46,8 @@ namespace internal {
...
@@ -46,8 +46,8 @@ namespace internal {
}
}
template
<
typename
T
>
template
<
typename
T
>
void
LockFreeStackNode
<
T
>::
SetNext
(
LockFreeStackNode
<
T
>*
next
)
{
void
LockFreeStackNode
<
T
>::
SetNext
(
LockFreeStackNode
<
T
>*
next
_to_set
)
{
this
->
next
=
next
;
this
->
next
=
next
_to_set
;
}
}
template
<
typename
T
>
template
<
typename
T
>
...
...
containers_cpp/test/hazard_pointer_test.cc
View file @
9e5cecd4
...
@@ -169,7 +169,7 @@ void HazardPointerTest::HazardPointerTest1ThreadMethod() {
...
@@ -169,7 +169,7 @@ void HazardPointerTest::HazardPointerTest1ThreadMethod() {
same
=
true
;
same
=
true
;
break
;
break
;
}
}
bool
success
=
stack_
->
TryPush
(
allocated_object_from_different_thread
);
success
=
stack_
->
TryPush
(
allocated_object_from_different_thread
);
PT_ASSERT
(
success
==
true
);
PT_ASSERT
(
success
==
true
);
}
}
PT_ASSERT
(
success_pop
==
true
);
PT_ASSERT
(
success_pop
==
true
);
...
...
containers_cpp/test/pool_test-inl.h
View file @
9e5cecd4
...
@@ -165,7 +165,6 @@ void PoolTest<ValuePool_t>::PoolTestStatic() {
...
@@ -165,7 +165,6 @@ void PoolTest<ValuePool_t>::PoolTestStatic() {
//if we allocate again, we should get those elements
//if we allocate again, we should get those elements
for
(
int
i
=
0
;
i
!=
static_cast
<
int
>
(
indexes_to_free
.
size
());
i
++
)
{
for
(
int
i
=
0
;
i
!=
static_cast
<
int
>
(
indexes_to_free
.
size
());
i
++
)
{
int
element
,
index
;
index
=
ap
.
Allocate
(
element
);
index
=
ap
.
Allocate
(
element
);
PT_EXPECT
((
index
!=
-
1
));
PT_EXPECT
((
index
!=
-
1
));
...
...
doc/examples/containers/queues-snippet.h
View file @
9e5cecd4
...
@@ -4,12 +4,12 @@ int i, j;
...
@@ -4,12 +4,12 @@ int i, j;
bool
result
=
queue
.
TryDequeue
(
i
);
//@\label{lst:queue_lst1:fail_pop}@
bool
result
=
queue
.
TryDequeue
(
i
);
//@\label{lst:queue_lst1:fail_pop}@
assert
(
result
==
false
);
assert
(
result
==
false
);
for
(
i
nt
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:queue_lst1:loop1}@
for
(
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:queue_lst1:loop1}@
result
=
queue
.
TryEnqueue
(
i
);
//@\label{lst:queue_lst1:push}@
result
=
queue
.
TryEnqueue
(
i
);
//@\label{lst:queue_lst1:push}@
assert
(
result
==
true
);
assert
(
result
==
true
);
}
}
for
(
i
nt
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:queue_lst1:loop2}@
for
(
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:queue_lst1:loop2}@
result
=
queue
.
TryDequeue
(
j
);
//@\label{lst:queue_lst1:pop}@
result
=
queue
.
TryDequeue
(
j
);
//@\label{lst:queue_lst1:pop}@
assert
(
result
==
true
&&
i
==
j
);
//@\label{lst:queue_lst1:assert}@
assert
(
result
==
true
&&
i
==
j
);
//@\label{lst:queue_lst1:assert}@
}
}
\ No newline at end of file
doc/examples/containers/stack-snippet.h
View file @
9e5cecd4
...
@@ -4,12 +4,12 @@ int i, j;
...
@@ -4,12 +4,12 @@ int i, j;
bool
result
=
stack
.
TryPop
(
i
);
//@\label{lst:stack_lst1:fail_pop}@
bool
result
=
stack
.
TryPop
(
i
);
//@\label{lst:stack_lst1:fail_pop}@
assert
(
result
==
false
);
assert
(
result
==
false
);
for
(
i
nt
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:stack_lst1:loop1}@
for
(
i
=
0
;
i
<=
4
;
++
i
)
{
//@\label{lst:stack_lst1:loop1}@
result
=
stack
.
TryPush
(
i
);
//@\label{lst:stack_lst1:push}@
result
=
stack
.
TryPush
(
i
);
//@\label{lst:stack_lst1:push}@
assert
(
result
==
true
);
assert
(
result
==
true
);
}
}
for
(
i
nt
i
=
4
;
i
>=
0
;
--
i
)
{
//@\label{lst:stack_lst1:loop2}@
for
(
i
=
4
;
i
>=
0
;
--
i
)
{
//@\label{lst:stack_lst1:loop2}@
result
=
stack
.
TryPop
(
j
);
//@\label{lst:stack_lst1:pop}@
result
=
stack
.
TryPop
(
j
);
//@\label{lst:stack_lst1:pop}@
assert
(
result
==
true
&&
i
==
j
);
//@\label{lst:stack_lst1:assert}@
assert
(
result
==
true
&&
i
==
j
);
//@\label{lst:stack_lst1:assert}@
}
}
\ No newline at end of file
mtapi_c/test/embb_mtapi_test_task.cc
View file @
9e5cecd4
...
@@ -107,7 +107,7 @@ void TaskTest::TestBasic() {
...
@@ -107,7 +107,7 @@ void TaskTest::TestBasic() {
mtapi_action_hndl_t
action
;
mtapi_action_hndl_t
action
;
mtapi_job_hndl_t
job
;
mtapi_job_hndl_t
job
;
mtapi_task_hndl_t
task
[
100
];
mtapi_task_hndl_t
task
[
100
];
in
t
ii
;
mtapi_uint_
t
ii
;
embb_mtapi_log_info
(
"running testTask...
\n
"
);
embb_mtapi_log_info
(
"running testTask...
\n
"
);
...
@@ -169,9 +169,9 @@ void TaskTest::TestBasic() {
...
@@ -169,9 +169,9 @@ void TaskTest::TestBasic() {
job
=
mtapi_job_get
(
JOB_TEST_TASK
,
THIS_DOMAIN_ID
,
&
status
);
job
=
mtapi_job_get
(
JOB_TEST_TASK
,
THIS_DOMAIN_ID
,
&
status
);
MTAPI_CHECK_STATUS
(
status
);
MTAPI_CHECK_STATUS
(
status
);
for
(
ii
=
0
;
ii
<
100
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
100
u
;
ii
++
)
{
status
=
MTAPI_ERR_UNKNOWN
;
status
=
MTAPI_ERR_UNKNOWN
;
in
t
arg
=
ii
;
mtapi_uint_
t
arg
=
ii
;
task
[
ii
]
=
mtapi_task_start
(
task
[
ii
]
=
mtapi_task_start
(
TASK_TEST_ID
,
TASK_TEST_ID
,
job
,
job
,
...
@@ -187,7 +187,7 @@ void TaskTest::TestBasic() {
...
@@ -187,7 +187,7 @@ void TaskTest::TestBasic() {
testDoSomethingElse
();
testDoSomethingElse
();
for
(
ii
=
0
;
ii
<
100
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
100
u
;
ii
++
)
{
status
=
MTAPI_ERR_UNKNOWN
;
status
=
MTAPI_ERR_UNKNOWN
;
mtapi_task_wait
(
task
[
ii
],
100000
,
&
status
);
mtapi_task_wait
(
task
[
ii
],
100000
,
&
status
);
MTAPI_CHECK_STATUS
(
status
);
MTAPI_CHECK_STATUS
(
status
);
...
@@ -227,7 +227,7 @@ void TaskTest::TestBasic() {
...
@@ -227,7 +227,7 @@ void TaskTest::TestBasic() {
MTAPI_CHECK_STATUS
(
status
);
MTAPI_CHECK_STATUS
(
status
);
mtapi_uint_t
result
[
kTaskInstances
];
mtapi_uint_t
result
[
kTaskInstances
];
for
(
mtapi_uint_t
ii
=
0
;
ii
<
kTaskInstances
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
kTaskInstances
;
ii
++
)
{
result
[
ii
]
=
kTaskInstances
+
1
;
result
[
ii
]
=
kTaskInstances
+
1
;
}
}
...
@@ -245,7 +245,7 @@ void TaskTest::TestBasic() {
...
@@ -245,7 +245,7 @@ void TaskTest::TestBasic() {
mtapi_task_wait
(
multiinstance_task
,
MTAPI_INFINITE
,
&
status
);
mtapi_task_wait
(
multiinstance_task
,
MTAPI_INFINITE
,
&
status
);
MTAPI_CHECK_STATUS
(
status
);
MTAPI_CHECK_STATUS
(
status
);
for
(
mtapi_uint_t
ii
=
0
;
ii
<
kTaskInstances
;
ii
++
)
{
for
(
ii
=
0
;
ii
<
kTaskInstances
;
ii
++
)
{
PT_EXPECT_EQ
(
result
[
ii
],
ii
);
PT_EXPECT_EQ
(
result
[
ii
],
ii
);
}
}
...
...
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