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.
This is done on an Ubuntu Trusty machine, with the command
There was already an attempt to protoize CL and ECL in the NOIRLab tree (f46b827), but this was not applicable, because the source trees deviate now significantly here because of #32 and a number of other bug fixes and clean-ups that were applied here but not in the NOIRLab tree. Also, it was incomplete, there are quite a number of prototypes missing. However, I checked this commit completely for potential bug fixes to be applied here (no findings for here; but NOIRLab obviously has some bugs...). The joys of missing coordination and a forked source tree.
The protoize tool is unfortunately removed from the gcc distribution after Ubuntu Trusty, so we had to use a VM to finally get this done. It seems that there are no more missing prototypes in IRAF; at least protoize didn't convert any other C file.
Another change here is that in
sys/libc
, the memory allocation functions should be declared in a more recent way, i.e. the memory is of typevoid *
instead ofchar *
.This way, we found one bug in
pkg/ecl/pfiles.c#L911-L915
(traceable back to version 2.8, 1989!):(with
char **p, **p;
)Obviously, the last line should force-add a
'\0'
at the end of each string (in case the length exceeded the maximum), but that is somehow different. NOIRLabs changejust silences the warning, but doesn't resolve the bug. IMO correct is
@mjfitzpatrick, you should change this in your fork as well.
We also take the opportunity here to fix few other (minor) warnings.