bugGNU Astronomy Utilities - Bugs: bug #48657, Incorrect error messages in...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

bug #48657: Incorrect error messages in convolve.c

Submitted by:  Vladimir Markelov <vvm>
Submitted on:  Fri 29 Jul 2016 05:39:51 AM UTC  
 
Category: ConvolveSeverity: 2 - Minor
Item Group: Source codeStatus: Fixed
Privacy: PublicAssigned to: Vladimir Markelov <vvm>
Open/Closed: Closed

Sat 30 Jul 2016 10:40:58 AM UTC, comment #4:

Sorry, I just noticed that the markup commands to display code were not sent by email or shown on the webpage, please see the examples on the Savannah markup webpage ;-)

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Sat 30 Jul 2016 10:38:11 AM UTC, comment #3:

Great! Thanks! It is now merged with master and pushed to the main repo ;-).

Just one point: when breaking the arguments of a function into multiple lines, we start the next line immediately under the opening parenthesis of the function. For example, in the current implementation, the new line is started like below:

It would be better if it was like this:

I have corrected these in a subsequent commit along with some other cases of lines that were too long.

While making these corrections, I noticed that there was a TAB character at the start of these lines. To make the source code view consistent on any local or web text editor, we have adopted the convention of not using TABs for indentation. So it would be great if you could also avoid TABs in the future ;-).

By the way, to display code nicely in Savannah, you can see the Savannah markup here:

https://savannah.gnu.org/cookbook/?func=detailitem&item_id=125

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Sat 30 Jul 2016 03:27:30 AM UTC, comment #2:

Sorry :) Yesterday I finished reading convolve, added bug and did not create a patch. Here it is:
https://github.com/VladimirMarkelov/gnuastro-vvm/commits/convolve-error-msg

Patch:
https://github.com/VladimirMarkelov/gnuastro-vvm/commit/366a8766693e8e8b2781582272f0d59d4ebb9df3

Vladimir Markelov <vvm>
Project MemberIn charge of this item.
Fri 29 Jul 2016 11:23:17 AM UTC, comment #1:

Thanks again for this very detailed correction. I just tried fetching from your fork but there was no branch for this correction. Any time its ready, let us know here ;-).

Mohammad Akhlaghi <makhlaghi>
Project Administrator
Fri 29 Jul 2016 05:39:51 AM UTC, original submission:

Two similar places in convolve.c:
205 pimg=p->pimg=malloc(2ps0ps1sizeof pimg);
206 if(pimg==NULL)
207 error(EXIT_FAILURE, errno, "%lu bytes for pimg", ps0ps1sizeof *pimg);

222 pker=p->pker=malloc(2ps0ps1sizeof pker);
223 if(pker==NULL)
224 error(EXIT_FAILURE, errno, "%lu bytes for pker", ps0ps1sizeof *pker);

In both places allocated memory size is twice as bigger as in the error message

Vladimir Markelov <vvm>
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 vvm (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 4 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Sat 30 Jul 2016 10:38:11 AM UTCmakhlaghiStatusIn Progress=>Fixed
      Open/ClosedOpen=>Closed
    Fri 29 Jul 2016 11:23:17 AM UTCmakhlaghiStatusNone=>In Progress
    Fri 29 Jul 2016 05:40:29 AM UTCvvmSummaryIncorrect error mesasge in convolve.c=>Incorrect error messages in convolve.c

    Back to the top


    Powered by Savane 3.1-cleanup1