Add comment about buffer
Fix incompatible pointer types warning
Coding style: remove trailing whitespace