Closed
Bug 292908
Opened 20 years ago
Closed 20 years ago
r:/mozilla\intl\uconv\src\nsTextToSubURI.cpp(231) : warning C4309: 'argument' : truncation of constant value
Categories
(Core :: XPCOM, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: timeless, Assigned: timeless)
Details
Attachments
(1 obsolete file)
r:/mozilla\intl\uconv\src\nsTextToSubURI.cpp(231) : warning C4309: 'argument' :
truncation of constant value
238 ** Bit masking macros. XXX n must be <= 31 to be portable
240 #define PR_BIT(n) ((PRUint32)1 << (n))
123 esc_SkipControl = PR_BIT(15) /* skips C0 and DEL from unescaping */
140 NS_COM PRBool NS_EscapeURL(const char *str,
141 PRInt32 len,
142 PRInt16 flags,
143 nsACString &result);
156 NS_COM PRBool NS_UnescapeURL(const char *str,
157 PRInt32 len,
158 PRInt16 flags,
159 nsACString &result);
162 inline PRInt32 NS_UnescapeURL(char *str) { return nsUnescapeCount(str); }
168 NS_EscapeURL(const nsASingleFragmentCString &part, PRInt16 partType,
nsACString &result) {
175 NS_UnescapeURL(const nsASingleFragmentCString &str, PRInt16 flags,
nsACString &result) {
230 NS_UnescapeURL(PromiseFlatCString(aURIFragment),
231 esc_SkipControl | esc_AlwaysCopy, unescapedSpec);
the problem is that you have 1 sign bit and 15 int bits, and we're trying to
pass a value in the 16th data bit (which doesn't exist). darin says it's ok to
switch to pruint32, so that's what the patch will do.
Attachment #182622 -
Flags: superreview?(darin)
Attachment #182622 -
Flags: review?(dougt)
Updated•20 years ago
|
Attachment #182622 -
Flags: review?(dougt) → review+
Updated•20 years ago
|
Attachment #182622 -
Flags: superreview?(darin) → superreview+
Attachment #182622 -
Flags: approval1.8b3?
Comment 2•20 years ago
|
||
Comment on attachment 182622 [details] [diff] [review]
fix flags to hold at least 16 flags
a=shaver
Attachment #182622 -
Flags: approval1.8b3? → approval1.8b3+
Comment on attachment 182622 [details] [diff] [review]
fix flags to hold at least 16 flags
mozilla/xpcom/io/nsEscape.h 1.25
mozilla/xpcom/io/nsEscape.cpp 1.34
Attachment #182622 -
Attachment is obsolete: true
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•