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)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla26

People

(Reporter: dholbert, Assigned: dholbert)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

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.
IMO this warning isn't useful. I don't like /**/ because they don't nest very well.
Attached patch fix v1 (deleted) — Splinter Review
Fixed with search-and-replace. (replacing "//" with " *" except on the first line of the comment, and added a final "*/" line)
Assignee: nobody → dholbert
Status: NEW → ASSIGNED
Attachment #789085 - Flags: review?(bgirard)
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+
(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.)
(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.)
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.

Attachment

General

Created:
Updated:
Size: