bugGNU 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: 

Other prototyped only functions: "fave" and "floatavestdmaskbyt0inregionsclip" in "include/statistics.h".  There should be no more.

To summarize, prototyped only functions are

  • "convertblank" and "setmaskname" in include/fitsarrayvv.h
  • "fave" and "floatavestdmaskbyt0inregionsclip" in include/statistics.h.


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.

Mosè Giordano <giordano>
Group Member
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>
Group administrator
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>
Group Member
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>
Group administrator
Sat 07 Nov 2015 01:01:57 AM UTC, comment #1: 

Also function "setmaskname" is only prototyped but not defined.

Mosè Giordano <giordano>
Group Member
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>
Group Member

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by makhlaghi (Posted a comment)
  • -email is unavailable- added by giordano (Submitted the item)
  •  

    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.

     

    Follow 3 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2015-11-07 makhlaghi Assigned toNone giordano
    2015-11-07 giordano Severity3 - Normal 2 - Minor
        Summaryconvertblank function prototyped but not defined Functions prototyped but not defined

    Back to the top

    Powered by Savane 3.13-3230.
    Corresponding source code