treewide: fix various build warnings; ignore vendored headers in formatting job
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I7af033c8d3f437e5574b050223cbc16a6a6a6964
This commit is contained in:
parent
b311a0a969
commit
3719dbccd5
10 changed files with 95 additions and 81 deletions
|
|
@ -397,13 +397,14 @@ void chroma_output_remove(chroma_state_t *state, uint32_t id) {
|
|||
free(output->description);
|
||||
|
||||
// Remove from array by shifting remaining elements
|
||||
int index = output - state->outputs;
|
||||
int remaining = state->output_count - index - 1;
|
||||
chroma_log("TRACE", "Removing output %u from array: index=%d, remaining=%d",
|
||||
ptrdiff_t index = output - state->outputs;
|
||||
size_t remaining = (size_t)(state->output_count - index - 1);
|
||||
chroma_log("TRACE", "Removing output %u from array: index=%td, remaining=%zu",
|
||||
id, index, remaining);
|
||||
if (remaining > 0) {
|
||||
memmove(output, output + 1, remaining * sizeof(chroma_output_t));
|
||||
chroma_log("TRACE", "Shifted %d outputs in array after removal", remaining);
|
||||
chroma_log("TRACE", "Shifted %zu outputs in array after removal",
|
||||
remaining);
|
||||
}
|
||||
|
||||
state->output_count--;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue