From b00d75ab7c776bdb3613b1978bd06d25d39aab7d Mon Sep 17 00:00:00 2001 From: Cory McWilliams Date: Wed, 19 Apr 2023 23:06:37 +0000 Subject: [PATCH] Fine. Fix windows. git-svn-id: https://www.unprompted.com/svn/projects/tildefriends/trunk@4262 ed5197a5-7fde-0310-b194-c3ffbd925b24 --- src/task.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/task.c b/src/task.c index 2779c746..5f983f00 100644 --- a/src/task.c +++ b/src/task.c @@ -887,7 +887,7 @@ static JSValue _tf_task_getHitches(JSContext* context, JSValueConst this_val, in tf_task_t* task = JS_GetContextOpaque(context); tf_trace_begin(task->_trace, __func__); JSValue result = JS_NewObject(context); - for (int i = 0; i < _countof(task->hitches); i++) + for (int i = 0; i < (int)_countof(task->hitches); i++) { if (*task->hitches[i].name) { @@ -1607,13 +1607,13 @@ static void _tf_task_trace_to_parent(tf_trace_t* trace, const char* buffer, size static void _tf_task_record_hitch(const char* name, uint64_t duration_ns, void* user_data) { tf_task_t* task = user_data; - for (int i = 0; i < _countof(task->hitches); i++) + for (int i = 0; i < (int)_countof(task->hitches); i++) { if (duration_ns > task->hitches[i].duration_ns) { - if (i + 1 < _countof(task->hitches)) + if (i + 1 < (int)_countof(task->hitches)) { - memmove(task->hitches + i + 1, task->hitches + i, sizeof(hitch_t) * (_countof(task->hitches) - i - 1)); + memmove(task->hitches + i + 1, task->hitches + i, sizeof(hitch_t) * ((int)_countof(task->hitches) - i - 1)); } snprintf(task->hitches[i].name, sizeof(task->hitches[i].name), "%s", name); task->hitches[i].duration_ns = duration_ns;