-
Notifications
You must be signed in to change notification settings - Fork 25
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
hdf/test: Remove local prototypes by moving local only functions to before use #445
Conversation
…before use This gets rid of a few redundant prototypes.
This is another one of those changes I'm on the fence about. Is this really better? In HDF5 we got sick of fragile function ordering and mandated function prototypes. In the tests it's probably okay since they are usually only used in the main function, but I'm not a hurry to go back to having to reorder unrelated code because I moved something. Maintaining the prototypes also sucks. I'm just not sure which one sucks more. Thoughts? |
|
For this type of stuff, I'm strongly in favor of removing them. The extra stuff adds up. Especially in testing, if there is an order dependency issue showing up, the compiler will complain and it frequently indicates a bug. Here for example, there is one prototype that I had to keep and it indicates there there is problem with a missing function in the headers for the tests. |
Could you give me more info on this missing function? |
You're right, it should have been in tproto.h, my mistake. I'll fix it. |
As discussed out-of-band, this PR does not match the style the HDF4 team wants, so I'm closing the PR. |
This gets rid of a few redundant prototypes.