As of gcc 4.6 -Wall includes -Wunused-but-set-variable. Use GIT_UNUSED or remove actually unused variables to prevent those warnings.