In the past we've moved away from macros with explicit types as parameters
in favor of casting void* results as needed (e.g., MALLOC()). Here, do the
same with mtod()*.
Obviously, this requires changing a lot of C files. To do so, a Coccinelle
semantic patch was used. It is provided in tools for consumers that want to
convert their code to the 1 argument variant.
*: For out of tree consumers, such as ports, a 2-argument variant of the
mtod macro is retained with identical API to the prior version.
The collection of preprocessor macro hacks used to construct a variadic
mtod() is shamelessly appropriated from Gregory Pakosz: