Closed Bug 953246 Opened 11 years ago Closed 11 years ago

gdk-screenshot.cpp:80:32: error: ‘nullptr’ was not declared in this scope

Categories

(Core :: General, defect)

All
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla29
Tracking Status
firefox28 --- fixed
firefox29 --- fixed

People

(Reporter: mcsmurf, Assigned: ehsan.akhgari)

References

Details

(Whiteboard: [qa-])

Attachments

(1 file, 1 obsolete file)

Linux SeaMonkey build with gcc 4.5 fails with this error: ../../../../../mozilla/testing/tools/screenshot/gdk-screenshot.cpp: In function ‘int main(int, char**)’: ../../../../../mozilla/testing/tools/screenshot/gdk-screenshot.cpp:80:32: error: ‘nullptr’ was not declared in this scope ../../../../../mozilla/testing/tools/screenshot/gdk-screenshot.cpp:130:27: error: ‘nullptr’ was not declared in this scope Fallout from Bug 784739
Now, are mozilla-specific includes ok in this file? As gdk-screenshot.cpp looks to me like it should compile with system includes only. I wanted to insert "#include "mozilla/NullPtr.h"" in that file.
Attached patch Patch (obsolete) — Splinter Review
In this specific case I think it's ok to revert to NULL. I'm mostly doing this because this file looks like it might be useful for other projects, too (note this file does not use the normal MPL license). Other projects might not want to use any Mozilla-specific headers. So I think in this case using NULL instead of nullptr/including our version of nullptr.h is ok.
Assignee: nobody → bugzilla
Status: NEW → ASSIGNED
Attachment #8351553 - Flags: review?(ehsan)
Though " #if (MOZ_WIDGET_GTK == 2)" is certainly Mozilla-specific... I'll let you decide what solution to use :)
(In reply to Frank Wein [:mcsmurf] from comment #3) > Though " #if (MOZ_WIDGET_GTK == 2)" is certainly Mozilla-specific... I'll > let you decide what solution to use :) Compare: https://hg.mozilla.org/mozilla-central/rev/8a723f12da34
Flags: needinfo?(bugzilla)
Yes, that's the other solution that's possible.
Flags: needinfo?(bugzilla)
Comment on attachment 8351553 [details] [diff] [review] Patch Review of attachment 8351553 [details] [diff] [review]: ----------------------------------------------------------------- You should include NullPtr.h here.
Attachment #8351553 - Flags: review?(ehsan) → review-
Ok, thanks ;)
Status: ASSIGNED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla29
Attached patch PatchSplinter Review
[Approval Request Comment] Bug caused by (feature/regressing bug #): Bug 784739 User impact if declined: Patch is only relevant for developers Testing completed (on m-c, etc.): Works fine on m-c Risk to taking this patch (and alternatives if risky): none, fixes a compile failure for older gcc compilers String or IDL/UUID changes made by this patch: -
Attachment #8355751 - Flags: review+
Attachment #8355751 - Flags: approval-mozilla-aurora?
Attachment #8351553 - Attachment is obsolete: true
This is NPOTB, so it doesn't require approval.
Keywords: checkin-needed
Attachment #8355751 - Flags: approval-mozilla-aurora? → approval-mozilla-aurora+
Keywords: checkin-needed
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: