From bbf9f5a78e42da9a7382c685dfa821589a7c6485 Mon Sep 17 00:00:00 2001 From: Patrick Steinhardt Date: Wed, 21 Nov 2018 11:20:14 +0100 Subject: 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. --- tests/path/win32.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'tests/path') 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) { -- cgit v1.2.1