Piotr Tworek 27b798fa4f base: Make int to access_t conversion explicit.
As far as I can tell this is not raised by any released GCC versions.
Clang 13 on the other hand warns about it due to implicit-int-conversion
warning which is automatically enabled together with Wconversion. The
problem is relatively simple, shifting access_t value does not always
produce result which is also of access_t type. For example, if access_t
is uint16_t, shifting it will produce integer result. This can be
observed even with GCC. Building the following C++ example will fail:

  #include <type_traits>
  #include <stdint.h>

  int test() {
      uint16_t a = 0xabcd;
      static_assert(std::is_same_v<decltype(a<<1), uint16_t>);
      return 0;
  }

Changing uint16_t in the static_assert to int, will allow the code to
build.

Make such int to access_t implicit conversion explicit to allow the code
to be compiled with both GCC and clang.

Issue #4354
2022-01-19 12:35:48 +01:00
..
2021-12-17 15:06:38 +01:00
2020-07-30 08:49:23 +02:00
2021-12-17 15:04:44 +01:00
2017-05-31 13:16:07 +02:00
2021-12-17 15:04:44 +01:00
2020-10-09 13:35:56 +02:00
2021-02-23 12:07:18 +01:00

This directory contains include files of interfaces that are exported
by components to be used by other components. Each subdirectory corresponds
to the component exporting the interface.