diff --git a/src/bitbuff.c b/src/bitbuff.c index 6b180eca..5bcb6426 100644 --- a/src/bitbuff.c +++ b/src/bitbuff.c @@ -806,4 +806,5 @@ void bitbuff_test(void) scratch_end(scratch); } + #endif diff --git a/src/space.c b/src/space.c index b0858693..5abc4e82 100644 --- a/src/space.c +++ b/src/space.c @@ -244,12 +244,12 @@ INTERNAL void space_cell_node_release(struct space_cell_node *n) } cell->valid = false; - /* Insert into free list */ + /* Insert cell into free list */ cell->next_free = space->first_free_cell; space->first_free_cell = cell; } - /* Insert into free list */ + /* Insert node into free list */ n->next_free = space->first_free_cell_node; space->first_free_cell_node = n; } diff --git a/src/string.c b/src/string.c index 71b8e022..3fe8655d 100644 --- a/src/string.c +++ b/src/string.c @@ -406,8 +406,7 @@ b32 string_ends_with(struct string str, struct string substring) * ========================== */ /* String formatting only has one format specifier: "%F". All specifier info is - * included in the arguments (instead of w/ the specifier like in printf). This - * is safer. + * included in the arguments (instead of w/ the specifier like in printf). * * Example: * string_format(arena, diff --git a/src/sys_win32.c b/src/sys_win32.c index 4c656192..1806e0e7 100644 --- a/src/sys_win32.c +++ b/src/sys_win32.c @@ -399,7 +399,7 @@ void sys_wait(void *addr, void *cmp, u32 size, f32 timeout_seconds) i16 parent_fiber_id = fiber->parent_id; /* Yield if job fiber, otherwise fall back to windows blocking function */ if (parent_fiber_id > 0) { - /* Yield if job fiber */ + /* FIXME: Implement fiber timeout */ *fiber->yield_param = (struct yield_param) { .kind = YIELD_KIND_WAIT, .wait = { @@ -571,10 +571,9 @@ INTERNAL struct fiber *fiber_alloc(enum fiber_kind kind) i32 rev_start = 0; i32 rev_end = id_chars_len - 1; while (rev_start < rev_end) { - char a = id_chars[rev_start]; - char b = id_chars[rev_end]; - id_chars[rev_start] = b; - id_chars[rev_end] = a; + char swp = id_chars[rev_start]; + id_chars[rev_start] = id_chars[rev_end]; + id_chars[rev_end] = swp; ++rev_start; --rev_end; } @@ -763,8 +762,8 @@ INTERNAL SYS_THREAD_DEF(job_worker_entry, worker_ctx_arg) success = SetThreadPriority(thread_handle, priority); ASSERT(success); - u64 affinity_mask = 1 << (ctx->id * 2); - success = !!SetThreadAffinityMask(thread_handle, affinity_mask); + u64 affinity_mask = (u64)1 << (ctx->id * 2); + success = SetThreadAffinityMask(thread_handle, affinity_mask) != 0; ASSERT(success); }