Fix C code bugs in set_image_delay and label#512
Merged
davidbyttow merged 2 commits intomasterfrom Mar 6, 2026
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
returnkeyword from void function (wasreturn vips_image_set_array_int(...)in avoidfunction, which can trigger compiler warnings)1to-1to match the codebase convention (all other C bridge functions return -1 on error)Test plan
go build ./vips/!= 0, so the label change is backwards-compatible🤖 Generated with Claude Code
Note
Fix
vips/operations.c::set_image_delayvoid return and makevips/operations.c::labelreturn -1 on internal errors to address C code bugsRemove an invalid value return from
set_image_delayand standardizelabelerror paths to return -1 instead of 1 in operations.c.📍Where to Start
Start at
set_image_delayandlabelin operations.c.Macroscope summarized 6e4e184.