Commit 9bc05809 by U-WW002\z003ksxf

Merge branch 'embb561_solving_warnings' into development

parents 3beab173 09783257
...@@ -74,7 +74,7 @@ int* IntObjectTestPool::Allocate() { ...@@ -74,7 +74,7 @@ int* IntObjectTestPool::Allocate() {
} }
void IntObjectTestPool::Release(int* object_pointer) { void IntObjectTestPool::Release(int* object_pointer) {
int cell = object_pointer - simplePoolObjects; int cell = static_cast<int>(object_pointer - simplePoolObjects);
simplePool[cell].Store(FREE_MARKER); simplePool[cell].Store(FREE_MARKER);
} }
......
...@@ -24,13 +24,25 @@ ...@@ -24,13 +24,25 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <embb/base/c/memory_allocation.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
// Suppress warning generated by malloc.h(160): expression before comma
// has no effect: expected expression with side effect
#pragma warning(push)
#pragma warning(disable : 4548)
#endif
#include <embb/containers/lock_free_tree_value_pool.h> #include <embb/containers/lock_free_tree_value_pool.h>
#include <embb/containers/wait_free_array_value_pool.h> #include <embb/containers/wait_free_array_value_pool.h>
#include <embb/containers/wait_free_spsc_queue.h> #include <embb/containers/wait_free_spsc_queue.h>
#include <embb/containers/object_pool.h> #include <embb/containers/object_pool.h>
#include <embb/containers/lock_free_stack.h> #include <embb/containers/lock_free_stack.h>
#include <embb/containers/lock_free_mpmc_queue.h> #include <embb/containers/lock_free_mpmc_queue.h>
#include <embb/base/c/memory_allocation.h>
#ifdef EMBB_PLATFORM_COMPILER_MSVC
#pragma warning(pop) // Reset warning 4548
#endif
#include <partest/partest.h> #include <partest/partest.h>
#include <embb/base/thread.h> #include <embb/base/thread.h>
...@@ -74,4 +86,4 @@ PT_MAIN("Data Structures C++") { ...@@ -74,4 +86,4 @@ PT_MAIN("Data Structures C++") {
PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool<bool COMMA false> >); PT_RUN(ObjectPoolTest< WaitFreeArrayValuePool<bool COMMA false> >);
PT_EXPECT(embb_get_bytes_allocated() == 0); PT_EXPECT(embb_get_bytes_allocated() == 0);
} }
\ No newline at end of file
mtapi_status_t status = task.Wait(MTAPI_INFINITE); mtapi_status_t task_status = task.Wait(MTAPI_INFINITE);
if (status != MTAPI_SUCCESS) { if (task_status != MTAPI_SUCCESS) {
printf("task failed with error: %d\n\n", status); printf("task failed with error: %d\n\n", task_status);
exit(status); exit(task_status);
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment