Commit a3afda9fb4d6b7e875c4e5163a85a81c46895fbf

Patrick Steinhardt 2019-06-28T11:50:32

tests: trace: fix parameter type of aux callback The function `git_win32__stack__set_aux_cb` expects the second parameter to be a function callback of type `git_win32__stack__aux_cb_lookup`, which expects a `size_t` parameter. In our test suite trace::windows::stacktrace, we declare the callback with `unsigned int` as parameter, though, causing a compiler warning. Correct the parameter type to silence the warning.

1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/tests/trace/windows/stacktrace.c b/tests/trace/windows/stacktrace.c
index ca5760e..756ac68 100644
--- a/tests/trace/windows/stacktrace.c
+++ b/tests/trace/windows/stacktrace.c
@@ -132,7 +132,7 @@ static void aux_cb_alloc__1(unsigned int *aux_id)
 	*aux_id = aux_counter++;
 }
 
-static void aux_cb_lookup__1(unsigned int aux_id, char *aux_msg, unsigned int aux_msg_len)
+static void aux_cb_lookup__1(unsigned int aux_id, char *aux_msg, size_t aux_msg_len)
 {
 	p_snprintf(aux_msg, aux_msg_len, "\tQQ%08x\n", aux_id);
 }