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

Many unused functions and function parameters, deprecated type aliases #52

Open
omartijn opened this issue Jun 20, 2021 · 0 comments
Open
Labels
ackknowledged Coin3d team acknowledges this issue

Comments

@omartijn
Copy link

In src/resize.c there are a lot of unused functions:

float filter(float)
float box_filter(float)
float triangle_filter(float)
B_spline_filter(float)
Lanczos3_filter(float)
Mitchell_filter(float)
unsigned char* simage_resize_fast(unsigned char, int, int, int, int, int)

src/simage_write.c also has some unused functions:

add_saver_ext
str_tolower

There are also quite some functions taking arguments they don't use, e.g. in src/simage_pic.c there is a function called simage_pic_identify which takes a const char * ptr argument it doesn't use, and in src/image.c there's a function called s_set_dynamic_loader_interface which gets three arguments, none of which are used (the function doesn't do anything).

Also, if you use this library with libtiff 4.3.0, you'll get some deprecation notices, because we use typedefs for numerics which are deprecated in this version onward, e.g. uint16.

What should we do with these issues? Is there a reason not to just remove the unused functions? They're all static, so I guess they're not doing us any good.

Removing the unused parameters likely means an API break, not sure what the policy is on that.

For libtiff compatibility we can probably just include stdint.h and use the typedefs from their (so e.g. changing uint16 to uint16_t).

@VolkerEnderlein VolkerEnderlein added the ackknowledged Coin3d team acknowledges this issue label Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ackknowledged Coin3d team acknowledges this issue
Projects
None yet
Development

No branches or pull requests

2 participants