Fixing compiler warnings and setting projects to raise errors for warnings