Skip to content

Fix C code bugs in set_image_delay and label#512

Merged
davidbyttow merged 2 commits intomasterfrom
fix/c-code-bugs
Mar 6, 2026
Merged

Fix C code bugs in set_image_delay and label#512
davidbyttow merged 2 commits intomasterfrom
fix/c-code-bugs

Conversation

@davidbyttow
Copy link
Owner

@davidbyttow davidbyttow commented Mar 5, 2026

Summary

  • set_image_delay: Remove return keyword from void function (was return vips_image_set_array_int(...) in a void function, which can trigger compiler warnings)
  • label: Change error return values from 1 to -1 to match the codebase convention (all other C bridge functions return -1 on error)

Test plan

  • go build ./vips/
  • Verified Go callers check != 0, so the label change is backwards-compatible

🤖 Generated with Claude Code

Note

Fix vips/operations.c::set_image_delay void return and make vips/operations.c::label return -1 on internal errors to address C code bugs

Remove an invalid value return from set_image_delay and standardize label error paths to return -1 instead of 1 in operations.c.

📍Where to Start

Start at set_image_delay and label in operations.c.

Macroscope summarized 6e4e184.

davidbyttow and others added 2 commits March 5, 2026 15:57
set_image_delay is declared void but used 'return vips_image_set_array_int(...)'
which can trigger compiler warnings. Remove the return keyword.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The label() function returned 1 on error, while all other C bridge
functions in this file use -1 (matching the libvips convention).
Functionally equivalent since Go checks != 0, but this makes the
codebase consistent.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@davidbyttow davidbyttow merged commit 6ae057d into master Mar 6, 2026
2 of 3 checks passed
@davidbyttow davidbyttow deleted the fix/c-code-bugs branch March 6, 2026 00:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant