GNU Astronomy Utilities - Bugs: bug #46393, Functions prototyped but not...
You are not allowed to post comments on this tracker with your current authentication level.
bug #46393: Functions prototyped but not defined
Submitter: | Mosè Giordano <giordano> | ||
Submitted: | Fri 06 Nov 2015 10:44:10 PM UTC | ||
Category: | Libraries | Severity: | 2 - Minor |
Item Group: | Source code | Status: | None |
Privacy: | Public | Assigned to: | giordano |
Open/Closed: | Open |
Sat 07 Nov 2015 02:20:46 PM UTC, comment #5: |
Mosè Giordano <giordano>![]() ![]() |
Sat 07 Nov 2015 11:24:13 AM UTC, comment #4: Yes, functions like "intdecreasing" also exist. I can think of two reasons now, mainly kept for possible future usage.
1. They were similar to existing functions, but had minor difference. We can remove these and if they are needed later, we can simply make them again.
2. Functions that were used in earlier versions of higher-level functions but after the latter were updated, the former functions were no longer needed. I only deleted the function if I felt there is absolutely no need for them later, so if they have stayed, I might have felt that they might be useful later.
When you confront such cases, it might be useful to add a comment ontop of the function explaining that it is not used with some standard string (that can be searched later). Then we can decide on which of those functions should be kept and which ones are redundant and must be deleted. |
Mohammad Akhlaghi <makhlaghi>![]() |
Sat 07 Nov 2015 10:50:51 AM UTC, comment #3: Actually there are also some function defined but not used, the last I found is "intdecreasing" forqsort.c, but I didn't take note of other such functions.
I'll continue to update this bug report to list all functions prototyped only, so they can be removed at once when possible. |
Mosè Giordano <giordano>![]() ![]() |
Sat 07 Nov 2015 04:29:16 AM UTC, comment #2: Such functions were first defined and then generalized to more general functions. I did try to remove the earlier versions from the headers too, but cases like this have slipped through my fingers and I forgot, sorry for that ;-).
If you encounter such functions in the future, please delete them without any hesitation. If a function protype is present and it is planned to be defined later, there should be a comment above it explaining the situation. |
Mohammad Akhlaghi <makhlaghi>![]() |
Sat 07 Nov 2015 01:01:57 AM UTC, comment #1: Also function "setmaskname" is only prototyped but not defined. |
Mosè Giordano <giordano>![]() ![]() |
Fri 06 Nov 2015 10:44:10 PM UTC, original submission:
In include/fitsarrayvv.h there is the prototype of the function "convertblank", but it isn't defined (nor used, of course) anywhere. Can we remove it or there is a plan to define it later? |
Mosè Giordano <giordano>![]() ![]() |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Other prototyped only functions: "fave" and "floatavestdmaskbyt0inregionsclip" in "include/statistics.h". There should be no more.
To summarize, prototyped only functions are
Regarding defined but not used functions, instead, I noticed that indeed most of the time they are functions doing something similar to other existing functions, so in view of creating a library it makes sense to keep those functions.