Commit bbf9f5a7 by Patrick Steinhardt

tests: path: only compile test_canonicalize on Win32 platforms

The function `test_canonicalize` is only used on Win32 platforms. It will thus
result in an unused function warning if these warnings are enabled and one is on
a platform different than Win32.

Fix the issue by only compiling in the function on Win32 platforms.
parent 14a9a4f3
......@@ -129,9 +129,9 @@ void test_path_win32__absolute_from_relative(void)
#endif
}
#ifdef GIT_WIN32
static void test_canonicalize(const wchar_t *in, const wchar_t *expected)
{
#ifdef GIT_WIN32
git_win32_path canonical;
cl_assert(wcslen(in) < MAX_PATH);
......@@ -139,11 +139,8 @@ static void test_canonicalize(const wchar_t *in, const wchar_t *expected)
cl_must_pass(git_win32_path_canonicalize(canonical));
cl_assert_equal_wcs(expected, canonical);
#else
GIT_UNUSED(in);
GIT_UNUSED(expected);
#endif
}
#endif
static void test_remove_namespace(const wchar_t *in, const wchar_t *expected)
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment