-
Notifications
You must be signed in to change notification settings - Fork 940
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A (hopefully) more universal fix for the signed max negative value pr…
…inter
- Loading branch information
1 parent
e2d5e1c
commit f480051
Showing
1 changed file
with
11 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
f480051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It could be easier ... if "(number_to_print == (1l << (UNITY_LONG_WIDTH-1)))" is true at L130, then the line 134 could use the constant value "(1l << (UNITY_LONG_WIDTH-1))". There is no need to use "number_to_print".
f480051
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I aggree that a constant can be used at line 134. But I would use
(1u << (UNITY_LONG_WIDTH-1))
instead of(1l << (UNITY_LONG_WIDTH-1))
since we want an unsigned number.Putting a signed constant result in the same issue that #76 (comment), no ?