Closed
Bug 904184
Opened 11 years ago
Closed 11 years ago
gfx/tests/gtest/TestLayers.h:22:1: warning: multi-line comment [-Wcomment]
Categories
(Core :: Graphics: Layers, defect)
Tracking
()
RESOLVED
FIXED
mozilla26
People
(Reporter: dholbert, Assigned: dholbert)
References
(Blocks 1 open bug)
Details
Attachments
(1 file)
1.65 KB,
patch
|
BenWa
:
review+
|
Details | Diff | Splinter Review |
I get several copies of these build warnings, when building mozilla-central with gcc 4.8:
> gfx/tests/gtest/TestLayers.h:22:1: warning: multi-line comment [-Wcomment]
> gfx/tests/gtest/TestLayers.h:24:1: warning: multi-line comment [-Wcomment]
The warning indicates that we have a "//" comment that ends with a "\", making the single-line comment continue onto the next line.
The "\" is actually part of an ASCII art picture.
We should just make this a C-style comment with /* ... */. That fixes this.
Comment 1•11 years ago
|
||
IMO this warning isn't useful. I don't like /**/ because they don't nest very well.
Assignee | ||
Comment 2•11 years ago
|
||
Fixed with search-and-replace. (replacing "//" with " *" except on the first line of the comment, and added a final "*/" line)
Comment 3•11 years ago
|
||
Comment on attachment 789085 [details] [diff] [review]
fix v1
I'm ok with this because I rather be warning clean over minimizing /**/ but I wouldn't mind if we disabled this warning.
Attachment #789085 -
Flags: review?(bgirard) → review+
Assignee | ||
Comment 4•11 years ago
|
||
Assignee | ||
Comment 5•11 years ago
|
||
(In reply to Benoit Girard (:BenWa) from comment #3)
> I'm ok with this because I rather be warning clean over minimizing /**/ but
> I wouldn't mind if we disabled this warning.
(I'd be against disabling this warning, FWIW, since it also checks for /* within existing /**/ comment, which is more clearly-wrong and worth catching/fixing.)
Assignee | ||
Comment 6•11 years ago
|
||
(Not to mention: if the ascii-art "\" is in the *last* line of a comment, right before some code, you'll unintentionally be commenting out the first line of code.)
Comment 7•11 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla26
You need to log in
before you can comment on or make changes to this bug.
Description
•