warning: initializer does not fit or is out of range: -128

VERIFIED FIXED

Status

NSPR
NSPR
VERIFIED FIXED
15 years ago
15 years ago

People

(Reporter: timeless, Assigned: Wan-Teh Chang)

Tracking

Firefox Tracking Flags

(Not tracked)

Details

(Whiteboard: [4.5])

Attachments

(1 attachment, 1 obsolete attachment)

(Reporter)

Description

15 years ago
Solaris 9 Sparc (deathstarii) Forte6
"/export/home/timeless/mozilla/nsprpub/lib/libc/src/strccmp.c", line 55:
warning: initializer does not fit or is out of range: -128

warning repeats for values -128..-1.
(Reporter)

Comment 1

15 years ago
Created attachment 131267 [details] [diff] [review]
don't mark uc array as unsigned
(Reporter)

Updated

15 years ago
Attachment #131267 - Flags: review?(wchang0222)
(Assignee)

Comment 2

15 years ago
Created attachment 131580 [details] [diff] [review]
Use regular octal constants rather than character constants as initializers

This patch avoids the type casts.
(Assignee)

Comment 3

15 years ago
I checked in my patch on the NSPR trunk (NSPR 4.5) and
NSPRPUB_PRE_4_2_CLIENT_BRANCH (Mozilla 1.6 alpha).

timeless, thank you for tracking this down and suggesting
a fix.  Your fix also works, but I prefer a solution that
doesn't use any type cast.  (This is a matter of taste.)
Status: NEW → RESOLVED
Last Resolved: 15 years ago
Resolution: --- → FIXED
Whiteboard: [4.5]
(Reporter)

Comment 4

15 years ago
vrfy fixed
Status: RESOLVED → VERIFIED
(Reporter)

Updated

13 years ago
Attachment #131267 - Attachment is obsolete: true
Attachment #131267 - Flags: review?(wtchang)
You need to log in before you can comment on or make changes to this bug.