Always write your code against the latest git:
git clone git://git.musicpd.org/master/mpd.git
Configure with the options --enable-debug
--enable-werror
. Enable as many plugins as possible,
to be sure that you don't break any disabled code.
Don't mix several changes in one single patch. Create a separate patch for every change. Tools like stgit help you with that.