Closed
Bug 229293
Opened 21 years ago
Closed 21 years ago
lib/base/arena.c: unary minus operator applied to unsigned type
Categories
(NSS :: Libraries, defect, P3)
Tracking
(Not tracked)
RESOLVED
FIXED
3.10
People
(Reporter: wtc, Assigned: wtc)
Details
Attachments
(1 file)
834 bytes,
patch
|
rrelyea
:
review+
julien.pierre
:
superreview+
|
Details | Diff | Splinter Review |
When compiling lib/base/arena.c, MSVC issues the following
compiler warnings:
cl -FoWIN954.0_DBG.OBJ/arena.obj -c -Od -Z7 -MD -W3 -nologo -DXP_PC -DDEBUG
-D_DEBUG -UNDEBUG -DDEBUG_bishakhabanerjee -DWIN32 -D_WINDOWS -D_X86_ -DWIN95
-I../../../../dist/WIN954.0_DBG.OBJ/include -I../../../../dist/public/nss
-I../../../../dist/private/nss -I../../../../dist/public/nspr
C:/nsstip_tbox/builds/tinderbox/win2K/mozilla/security/nss/lib/base/arena.c
arena.c
C:/nsstip_tbox/builds/tinderbox/win2K/mozilla/security/nss/lib/base/arena.c(964)
: warning C4146: unary minus operator applied to unsigned type, result still
unsigned
C:/nsstip_tbox/builds/tinderbox/win2K/mozilla/security/nss/lib/base/arena.c(1041)
: warning C4146: unary minus operator applied to unsigned type, result still
unsigned
Assignee | ||
Comment 1•21 years ago
|
||
&a[-i] is equivalent to a-i. The latter avoids
the unary minus operator.
Assignee | ||
Updated•21 years ago
|
Attachment #137896 -
Flags: superreview?(jpierre)
Attachment #137896 -
Flags: review?(rrelyea0264)
Updated•21 years ago
|
Attachment #137896 -
Flags: superreview?(jpierre) → superreview+
Comment 2•21 years ago
|
||
Comment on attachment 137896 [details] [diff] [review]
Proposed patch
a-i is easier to read than &[-i] as well.
Attachment #137896 -
Flags: review?(rrelyea0264) → review+
Assignee | ||
Comment 3•21 years ago
|
||
Fixed checked in on the trunk.
Checking in arena.c;
/cvsroot/mozilla/security/nss/lib/base/arena.c,v <-- arena.c
new revision: 1.6; previous revision: 1.5
done
Status: NEW → RESOLVED
Closed: 21 years ago
Resolution: --- → FIXED
Target Milestone: --- → 3.10
Comment 4•20 years ago
|
||
Setting priorities on unprioritized bugs resolved fixed for NSS 3.10.
Setting this to P3, since it was motivated only as warning reduction.
Priority: -- → P3
You need to log in
before you can comment on or make changes to this bug.
Description
•