This slightly improves type safety. The culprits were found with: git grep -E '\([a-z0-9_ ]+ \*\)\W?[a-z]'
This is a bit more type-safe.
wlr_buffer.c is difficult to read because it contains a mixed bag of unrelated things: base buffer type, buffer implementations, buffer resource factory, and client buffer. Split each of these into their own file.