Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix opjMinusOneSizeT type mismatch #36

Merged
merged 1 commit into from
Feb 24, 2021

Conversation

hejob
Copy link
Contributor

@hejob hejob commented Feb 21, 2021

In src/openjpeg/image_stream.go, the value returned by opjStreamRead is opjMinusOne64 (type OPJ_UINT64), which seemingly mismatches the return type OPJ_SIZE_T under some compiling systems.

The compilation fails in local golang environment under MacOS Catalina with brew module openjpeg installed and used as a library. The problem is fixed after changing return value to opjMinusOneSizeT.

I think the reason it goes well in docker environment (both alpine and golang) is maybe that the two types references to the same type in ibopenjp2-7-dev. But in my MacOS local environment, the two types confirmed are u_longlong and u_long respectively.

@jechols
Copy link
Member

jechols commented Feb 24, 2021

Fixes #37

Great catch, thanks! I'm totally confused as to why I ever had the opjMinusOne64 variable - it was never in use in the code as far as I can tell, even digging through the entire history of the project.

I should have this merged shortly.

@jechols jechols merged commit 18efb4e into uoregon-libraries:develop Feb 24, 2021
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.

2 participants