Closed Bug 1372977 Opened 2 years ago Closed 2 years ago

Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr)

Categories

(Core :: Audio/Video: Playback, enhancement)

47 Branch
enhancement
Not set

Tracking

()

RESOLVED FIXED
mozilla56
Tracking Status
firefox56 --- fixed

People

(Reporter: janx, Assigned: janx)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

In /media and /dom/media there are several opportunities to use `nullptr` instead of `0` or `NULL`.

These can be automatically identified and acted on by the clang-tidy static analyzer (rule "modernize-use-nullptr").
This patch was generated with the following command:

run-clang-tidy-4.0.py -p obj-x86_64-pc-linux-gnu/ -fix -checks=-*,modernize-use-nullptr dom/media/,media/
Attachment #8877676 - Flags: review?(padenot)
more of the code in /media is from 3rd party libs, very few is our own code (the exception is media/libstagefright/bindings).

So we shouldn't touch that, only makes resyncing with upstream difficult
Attachment #8877676 - Flags: review?(padenot) → review-
I omitted libstagefright and ffmpeg on purpose. Please indicate which files in my patch are from external libraries so I can omit any fixes there. Thanks!
Flags: needinfo?(jyavenard)
all in media/ ?

the one in dom/media are fine.
Flags: needinfo?(jyavenard)
Component: Audio/Video → Audio/Video: Playback
> all in media/ ?
> 
> the one in dom/media are fine.

Thanks! But media/mtransport/ should be fine (according to tools/rewriting/ThirdPartyPaths.txt).

Paul, please have a look.

https://treeherder.mozilla.org/#/jobs?repo=try&revision=f5e3fec4f5bd863ddf7d072f40b7d8429c08f76f
Attachment #8881447 - Flags: review?(padenot)
Attachment #8877676 - Attachment is obsolete: true
Attachment #8881447 - Flags: review?(padenot) → review?(docfaraday)
Attachment #8881447 - Flags: review?(docfaraday) → review+
Thanks Paul and Byron! Rebased and updated to "r=bwc".
Attachment #8881987 - Flags: review+
Attachment #8881447 - Attachment is obsolete: true
Sheriffs, please land this patch.
Keywords: checkin-needed
Pushed by ryanvm@gmail.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/fbfd540c840d
Use nullptr in /media and /dom/media (clang-tidy: modernize-use-nullptr). r=bwc
Keywords: checkin-needed
https://hg.mozilla.org/mozilla-central/rev/fbfd540c840d
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla56
You need to log in before you can comment on or make changes to this bug.