Skip to content

Commit

Permalink
Suppress ICC deprecation warning for mallinfo (uxlfoundation#1005)
Browse files Browse the repository at this point in the history
Signed-off-by: Isaev, Ilya <ilya.isaev@intel.com>
  • Loading branch information
isaevil authored Jan 11, 2023
1 parent bef111d commit 9434ec9
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions test/tbbmalloc/test_malloc_overload.cpp
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
Copyright (c) 2005-2022 Intel Corporation
Copyright (c) 2005-2023 Intel Corporation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
Expand Down Expand Up @@ -449,10 +449,19 @@ TEST_CASE("Main set of tests") {
CheckMemalignFuncOverload(aligned_alloc, free);
#endif

#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#if __INTEL_COMPILER
#pragma warning(push)
#pragma warning(disable: 1478)
#elif __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
struct mallinfo info = mallinfo();
#pragma GCC diagnostic pop
#if __INTEL_COMPILER
#pragma warning(pop)
#elif __GNUC__
#pragma GCC diagnostic pop
#endif
// right now mallinfo initialized by zero
REQUIRE((!info.arena && !info.ordblks && !info.smblks && !info.hblks
&& !info.hblkhd && !info.usmblks && !info.fsmblks
Expand Down

0 comments on commit 9434ec9

Please sign in to comment.