fix compiler warning in string/public/nsBufferHandleUtils.h

RESOLVED WONTFIX

Status

()

defect
--
trivial
RESOLVED WONTFIX
17 years ago
15 years ago

People

(Reporter: benjamin, Assigned: benjamin)

Tracking

(Blocks 1 bug)

Trunk
Points:
---
Dependency tree / graph

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

This is just a little patch that fixes a minor compiler warning in
string/public/nsBufferHandleUtils.h -- line 71 has an assignment inside an if().
Posted patch -u patchSplinter Review
-u patch
Which compiler?

I thought compilers would warn for

  if ( foo = bar )

but not for

  if ( (foo = bar) )

Regardless, there is nothing wrong with an assigment inside an if, it's nice
that the compiler tries to tell us we may have meant == instead of =, but I
don't think we need to make this change just to make some compiler not warn.
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → WONTFIX
Summary: fix compiler warning in string/public/nsBufferHandleUtils.h → fix compiler warning in string/public/nsBufferHandleUtils.h
Compiler is MSVC6 (warning-level 4)

I normally don't care about warnings in mozilla source files, but this is a
header that I was including (through nsASharableString) in another application,
and getting warnings on each source file that included it.

Truly it doesn't make a big difference, but the change can't hurt, can it?  I
thought that providing a patch might make it a painless fix ;)
Alec, dbaron, what do you two think?

It's a shame MSVC6 doesn't take the parentheses hint that this was really what
we meant and not a typo.
Making the change is ok with me.  Just wait to check it in until something else
comes around that triggers a world-rebuild.
Comment on attachment 105288 [details] [diff] [review]
-u patch

sounds fine to me too. sr=alecf
Attachment #105288 - Flags: superreview+
Reopening per comments.  This is obviously not urgent, so it could wait even
until the 1.4 tree opening if need be.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Comment on attachment 105288 [details] [diff] [review]
-u patch

r=jag
Attachment #105288 - Flags: review+
Blocks: buildwarning
Mine, this will go in after 1.4
Assignee: jaggernaut → bsmedberg
Status: REOPENED → NEW
Priority: -- → P5
Target Milestone: --- → mozilla1.5alpha
Comment on attachment 105288 [details] [diff] [review]
-u patch


bsmedberg (or anyone):
Can you check in your r+/sr+ patch ? Thanks.
Retargeting: v1.5a -> v1.7a.
Severity: minor → trivial
OS: Windows 2000 → All
Hardware: PC → All
Target Milestone: mozilla1.5alpha → mozilla1.7alpha
This code has disappeared ;)
Status: NEW → RESOLVED
Closed: 17 years ago15 years ago
Resolution: --- → WONTFIX
Priority: P5 → --
Target Milestone: mozilla1.7alpha → ---
You need to log in before you can comment on or make changes to this bug.