fileops.c: fix unused warning

Signed-off-by: schu <schu-github@schulog.org>
This commit is contained in:
schu 2011-06-06 12:17:58 +02:00
parent f9213015fd
commit 05b49b02ef

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)
{ {