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

Submitted by:  Mosè Giordano <giordano>
Submitted on:  Fri 06 Nov 2015 10:44:10 PM UTC  
 
Category: LibrariesSeverity: 2 - Minor
Item Group: Source codeStatus: None
Privacy: PublicAssigned to: Mosè Giordano <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>
Project MemberIn charge of this item.
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>
Project 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>
Project MemberIn charge of this item.
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>
Project Administrator
Sat 07 Nov 2015 01:01:57 AM UTC, comment #1:

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

Mosè Giordano <giordano>
Project MemberIn charge of this item.
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>
Project MemberIn charge of this item.

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

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

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 07 Nov 2015 04:29:16 AM UTCmakhlaghiAssigned toNone=>giordano
    Sat 07 Nov 2015 01:01:57 AM UTCgiordanoSeverity3 - Normal=>2 - Minor
      Summaryconvertblank function prototyped but not defined=>Functions prototyped but not defined

    Back to the top


    Powered by Savane 3.1-cleanup1