Skip to content

vlc_list: use static_cast for std::nullptr_t conversion

Current code can lead to the following error:

invalid cast from type 'std::nullptr_t' to type 'const volatile info_t*'

Following documentation1 from cppreference.com:

9) The null pointer value of any pointer type can be converted to any
   other pointer type, resulting in the null pointer value of that type.
   Note that the null pointer constant nullptr or any other value of
   type std::nullptr_t cannot be converted to a pointer with
   reinterpret_cast: implicit conversion or static_cast should be used
   for this purpose.

Fix #28526 (closed)

  1. https://en.cppreference.com/w/cpp/language/reinterpret_cast

Merge request reports

Loading