Merge pull request #242 from schu/fix-unused-2

fileops.c: fix unused warning v2
This commit is contained in:
Vicent Martí 2011-06-07 07:03:14 -07:00
commit 275c6a0b37

View File

@ -334,17 +334,22 @@ int gitfo_dirent(
return GIT_SUCCESS; return GIT_SUCCESS;
} }
#if GIT_PLATFORM_PATH_SEP == '/'
void gitfo_posixify_path(char *GIT_UNUSED(path))
{
/* nothing to do*/
}
#else
void gitfo_posixify_path(char *path) void gitfo_posixify_path(char *path)
{ {
#if GIT_PLATFORM_PATH_SEP != '/' while (*path) {
while (*path) { if (*path == GIT_PLATFORM_PATH_SEP)
if (*path == GIT_PLATFORM_PATH_SEP) *path = '/';
*path = '/';
path++; path++;
} }
#endif
} }
#endif
int gitfo_retrieve_path_root_offset(const char *path) int gitfo_retrieve_path_root_offset(const char *path)
{ {