GNU nano - Bugs: bug #49816, Fix mismatched variable type,...
You are not allowed to post comments on this tracker with your current authentication level.
bug #49816: Fix mismatched variable type, missing #ifdef in line number display
Submitter: | David Lawrence Ramsey <dolorous> | ||
Submitted: | Fri 09 Dec 2016 05:46:38 PM UTC | ||
Severity: | 2 - Minor | Status: | Fixed |
Assigned to: | dolorous | Open/Closed: | Closed |
Tue 13 Dec 2016 12:11:33 PM UTC, comment #4: |
Benno Schulenberg <bens> |
Mon 12 Dec 2016 07:35:24 PM UTC, comment #3: Oops, I got the types backwards on digits(). It was supposed to take a ssize_t and return an int. And you have a point on the soon-to-be-elided variables, so I removed those changes.
|
David Lawrence Ramsey <dolorous> |
Sun 11 Dec 2016 10:36:38 AM UTC, comment #2: Hm. You write: "Convert digits() to take a ssize_t instead of int, since it's used on ssize_t line numbers", but then you convert the type of the /result/ of digits() instead of the type of the /argument/. For me, "take" refers to the argument, "produce" to the return value.
|
Benno Schulenberg <bens> |
Fri 09 Dec 2016 06:02:15 PM UTC, comment #1: Oops: the variables last_drawn_line and last_line_y need to be ssize_t as well. New patch against current git attached. |
David Lawrence Ramsey <dolorous> |
Fri 09 Dec 2016 05:46:38 PM UTC, original submission:
The line number display routine and the parameter passed into digits() both improperly assume that the current line number is an int instead of a ssize_t. Also, the prototype for digits() is included even when the function isn't, since the former is missing #ifdef ENABLE_LINENUMBERS.
|
David Lawrence Ramsey <dolorous> |
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.
Follow 8 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2016-12-13 | bens | Assigned to | None | dolorous | |
2016-12-13 | bens | Severity | 3 - Normal | 2 - Minor | |
Status | None | Fixed | |||
Open/Closed | Open | Closed | |||
2016-12-12 | dolorous | Attached File | - | Added 0001-Fix-line-number-display-to-properly-use-ssize_t-inst.patch, #39204 | |
2016-12-09 | dolorous | Attached File | #39186 | Removed | |
2016-12-09 | dolorous | Attached File | - | Added 0001-Fix-line-number-display-and-variables-to-properly-us.patch, #39187 | |
2016-12-09 | dolorous | Attached File | - | Added 0001-Fix-line-number-display-to-properly-use-ssize_t-inst.patch, #39186 |
Powered by Savane 3.13-3230.
Corresponding source code
Applied to git, with some adjustment of the commit message. Thanks for the patch.
(Closing, because it doesn't fix any real bug.)