Closed Bug 790123 Opened 12 years ago Closed 12 years ago

CSS2PropertiesBinding.h:141:1: warning: no newline at end of file [-pedantic,-Wnewline-eof]

Categories

(Core :: DOM: Core & HTML, defect)

x86_64
Linux
defect
Not set
trivial

Tracking

()

RESOLVED FIXED
mozilla18

People

(Reporter: MatsPalmgren_bugz, Assigned: bzbarsky)

References

Details

Attachments

(1 file, 1 obsolete file)

clang++ complains:
../../../../dist/include/mozilla/dom/CSS2PropertiesBinding.h:141:1: warning: no newline at end of file [-pedantic,-Wnewline-eof]

clang version 3.1 (trunk 152341)
Summary: SS2PropertiesBinding.h:141:1: warning: no newline at end of file [-pedantic,-Wnewline-eof] → CSS2PropertiesBinding.h:141:1: warning: no newline at end of file [-pedantic,-Wnewline-eof]
This applies to all the generated binding headers, right?

The problem is that we run the overall text through this:

  def stripTrailingWhitespace(text):
    lines = text.splitlines()
    for i in range(len(lines)):
        lines[i] = lines[i].rstrip()
    return '\n'.join(lines)

Patch coming up.
Comment on attachment 660075 [details] [diff] [review]
Make sure to not lose a single trailing newline in stripTrailingWhitespace.

Seems like this is bound to happen sooner or later:

>>> stripTrailingWhitespace('')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "<stdin>", line 2, in stripTrailingWhitespace
IndexError: string index out of range
Attachment #660075 - Flags: review-
Attachment #660139 - Flags: review?(matspal)
Attachment #660075 - Attachment is obsolete: true
Comment on attachment 660139 [details] [diff] [review]
OK, how about something like this, then?

Looks good, thanks.
Attachment #660139 - Flags: review?(matspal) → review+
https://hg.mozilla.org/integration/mozilla-inbound/rev/3254e5b70c09
Assignee: nobody → bzbarsky
Flags: in-testsuite-
Target Milestone: --- → mozilla18
https://hg.mozilla.org/mozilla-central/rev/3254e5b70c09
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Component: DOM → DOM: Core & HTML
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: