iadk/array.h: do not redefine assert() to nothing in an unrelated .h

Do not unconditionally define assert() to nothing in some obscure and
unrelated array.h file.

This looks like it was a temporary hack that was missed in:
Fixes commit 6f366e2eef ("Add definition of interfaces of Intel IADK
modules."), part of PR #5848 too massive to be properly reviewed.
(docs.zephyrproject.org/latest/contribute/contributor_expectations.html)

In addition to enabling asserts when requested by a debug build (!), fix
the following messenger warning:

```
In file included
   from src/include/sof/common.h:30,
   from src/include/sof/audio/sink_api.h:10,
   from src/include/sof/audio/module_adapter/module/module_interface.h:17,
   from src/include/sof/audio/module_adapter/iadk/iadk_module_adapter.h:19,
   from src/audio/module_adapter/iadk/system_agent.cpp:22:
 zephyr/include/rtos/panic.h:19: error: "assert" redefined [-Werror]
   19 | #define assert(x) __ASSERT_NO_MSG(x)
      |

In file included from
  src/audio/module_adapter/iadk/system_agent.cpp:16:
  src/include/sof/audio/module_adapter/iadk/utilities/array.h:60:
   note:  this is the location of the previous definition
   60 | #define assert(cond)
```

This warning appeared only later in messenger commit
002d4a3f66 ("Pipeline2.0: change module API to use various data")
because it started to include audio/sink_api.h in
module_interface.h. This led to the two definitions finally clashing
with each other.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-06-21 18:37:12 +00:00 committed by Kai Vehmanen
parent f97183a8c4
commit fe83601406
1 changed files with 2 additions and 2 deletions

View File

@ -9,6 +9,8 @@
#include <stdint.h>
#include <stddef.h>
#include <rtos/panic.h>
#ifdef __cplusplus
extern "C" {
#endif
@ -56,8 +58,6 @@ static inline uint8_t *array_alloc_from(byte_array_t *ba,
#endif
#ifdef __cplusplus
/* clang-format off */
#define assert(cond)
static inline uint8_t *array_get_data(const byte_array_t &ba)
{