Closed Bug 1165940 Opened 7 years ago Closed 7 years ago

dom/media/CanvasCaptureMediaStream.cpp fails to compile because overridden virtual function Notify (from nsITimer.h) is not marked with override on clang

Categories

(Core :: Canvas: 2D, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1032848

People

(Reporter: ato, Unassigned)

Details

(Whiteboard: [gfx-noted])

Attachments

(1 file, 1 obsolete file)

clang fails to compile dom/media/CanvasCaptureMediaStream.cpp:229 because Notify overrides virtual the virtual function defined in nsITimer.h, but is not marked with "override".

The compiler output:

 0:07.12 In file included from /home/ato/Code/gecko/build/b2g-release/dom/media/Unified_cpp_dom_media0.cpp:83:
 0:07.12 /home/ato/Code/gecko/src/dom/media/CanvasCaptureMediaStream.cpp:229:3: error: 'Notify' overrides a member function but is not marked 'override' [-Werror,-Winconsistent-missing-override]
 0:07.12   Notify(nsITimer* aTimer)
 0:07.12   ^
 0:07.12 ../../dist/include/nsITimer.h:48:14: note: overridden virtual function is here
 0:07.12   NS_IMETHOD Notify(nsITimer *timer) = 0;
 0:07.12              ^
 0:07.12 1 error generated.
 0:07.12 
 0:07.12 In the directory  /home/ato/Code/gecko/build/b2g-release/dom/media
 0:07.12 The following command failed to execute properly:
 0:07.12 /usr/bin/ccache clang++ -o .o -c -I../../dist/stl_wrappers -I../../dist/system_wrappers -include /home/ato/Code/gecko/src/config/gcc_hidden.h -DMOZILLA_INTERNAL_API -DOS_POSIX=1 -DOS_LINUX=1 -DSTATIC_EXPORTABLE_JS_API -DMOZILLA_INTERNAL_API -DIMPL_LIBXUL -DMOZ_GLUE_IN_PROGRAM -DAB_CD=en-US -DNO_NSPR_10_SUPPORT -I/home/ato/Code/gecko/src/dom/media -I. -I/home/ato/Code/gecko/build/b2g-release/ipc/ipdl/_ipdlheaders -I/home/ato/Code/gecko/src/caps -I/home/ato/Code/gecko/src/dom/base -I/home/ato/Code/gecko/src/dom/camera -I/home/ato/Code/gecko/src/layout/generic -I/home/ato/Code/gecko/src/layout/xul -I/home/ato/Code/gecko/src/netwerk/base -I/home/ato/Code/gecko/src/media/webrtc/signaling/src/common -I/home/ato/Code/gecko/src/media/webrtc/trunk -I/home/ato/Code/gecko/src/ipc/chromium/src -I/home/ato/Code/gecko/src/ipc/glue -I../../dist/include -I/home/ato/Code/gecko/build/b2g-release/dist/include/nspr -I/home/ato/Code/gecko/build/b2g-release/dist/include/nss -fPIC -Qunused-arguments -DMOZILLA_CLIENT -include ../../mozilla-config.h -MD -MP -MF .deps/Unified_cpp_dom_media0.o.pp -Qunused-arguments -Qunused-arguments -Wall -Wempty-body -Woverloaded-virtual -Wsign-compare -Wwrite-strings -Werror=endif-labels -Werror=int-to-pointer-cast -Werror=missing-braces -Werror=parentheses -Werror=pointer-arith -Werror=return-type -Werror=sequence-point -Werror=switch -Werror=trigraphs -Werror=type-limits -Werror=uninitialized -Werror=unused-label -Werror=non-literal-null-conversion -Werror=sometimes-uninitialized -Wno-invalid-offsetof -Wno-inline-new-delete -Wno-c++0x-extensions -Wno-extended-offsetof -Wno-unknown-warning-option -Wno-return-type-c-linkage -Wno-error=deprecated-declarations -Wno-error=array-bounds -DMOZ_ENABLE_JS_DUMP -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -std=gnu++0x -pthread -pipe -DNDEBUG -DTRIMMED -g -Os -fomit-frame-pointer -Werror -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/libxml2 -Wno-error=attributes /home/ato/Code/gecko/build/b2g-release/dom/media/Unified_cpp_dom_media0.cpp
 0:07.12 /home/ato/Code/gecko/src/config/rules.mk:946: recipe for target 'Unified_cpp_dom_media0.o' failed
 0:07.12 make[5]: *** [Unified_cpp_dom_media0.o] Error 1
Attached file MozReview Request: bz://1165940/ato (obsolete) —
/r/8941 - Bug 1165940: Add override to fix dom/media clang compile

Pull down this commit:

hg pull -r aa1a4b0ba2186796a9b27b248bbb2d045c78f667 https://reviewboard-hg.mozilla.org/gecko/
Attachment #8607078 - Flags: review?(pehrsons)
Whiteboard: [gfx-noted]
Comment on attachment 8607078 [details]
MozReview Request: bz://1165940/ato

https://reviewboard.mozilla.org/r/8939/#review7633

::: dom/media/CanvasCaptureMediaStream.cpp:229
(Diff revision 1)
> -  Notify(nsITimer* aTimer)
> +  Notify(nsITimer* aTimer) override

Truly sorry for the hassle. :dholbert already fixed this as a followup to bug 1032848.
Attachment #8607078 - Flags: review?(pehrsons)
Excellent, thanks!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1032848
Attachment #8607078 - Attachment is obsolete: true
You need to log in before you can comment on or make changes to this bug.