diff options
author | Patrick Steinhardt <ps@pks.im> | 2018-11-21 11:20:14 +0100 |
---|---|---|
committer | Patrick Steinhardt <ps@pks.im> | 2018-11-28 15:22:27 +0100 |
commit | bbf9f5a78e42da9a7382c685dfa821589a7c6485 (patch) | |
tree | 862d78a212943e3160fdb4d5cd9829a4e63e8339 /tests/path | |
parent | 14a9a4f34638cb4b1c56b0e229692b0869f3514b (diff) | |
download | libgit2-bbf9f5a78e42da9a7382c685dfa821589a7c6485.tar.gz |
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.
Diffstat (limited to 'tests/path')
-rw-r--r-- | tests/path/win32.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/tests/path/win32.c b/tests/path/win32.c index a5413c781..f45bf58b4 100644 --- a/tests/path/win32.c +++ b/tests/path/win32.c @@ -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) { |