bugGNU nano - Bugs: bug #49806, a few variable types are mismatched

 
 

bug #49806: a few variable types are mismatched

Submitted by:  David Lawrence Ramsey <dolorous>
Submitted on:  Thu 08 Dec 2016 08:48:16 PM UTC  
 
Severity: 3 - NormalStatus: Fixed
Assigned to: David Lawrence Ramsey <dolorous>Open/Closed: Closed

Add a New Comment(Rich Markup)
   

You are not logged in

Please log in, so followups can be emailed to you.

 

Fri 09 Dec 2016 09:18:02 AM UTC, comment #1:

Thanks for the patch. Applied, with a trimmed commit message -- but forgot to add a reference to this bug. :|

(Ehm... You mean getline() /produces/ ssize_t? Because it does /take/ size_t, like the others.)

Benno Schulenberg <bens>
Project Administrator
Thu 08 Dec 2016 08:48:16 PM UTC, original submission:

There are a few instances in the file locking code that use ssize_t where they should use size_t[0].

Also, there is one instance in fsfromline() that displays the line number as an int when it should display it as an unsigned long, since the line number is a ssize_t; note that the new long modifier in the printf() breaks a translatable string.

The attached patch against current git fixes these.

[0] fwrite() and read() take size_t, but getline(), which is used elsewhere, takes ssize_t. The latter instances are unchanged. (Nice and confusing, I know.)

David Lawrence Ramsey <dolorous>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by bens (Posted a comment)
  • -unavailable- added by dolorous (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 5 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Tue 13 Dec 2016 11:49:59 AM UTCbensOpen/ClosedOpen=>Closed
    Fri 09 Dec 2016 09:18:02 AM UTCbensStatusNone=>Fixed
      Assigned toNone=>dolorous
      SummaryA few variable types are mismatched=>a few variable types are mismatched
    Thu 08 Dec 2016 08:48:16 PM UTCdolorousAttached File-=>Added 0001-Add-a-few-variable-type-fixes.patch, #39178

    Back to the top


    Powered by Savane 3.1-cleanup1