Closed Bug 768924 Opened 13 years ago Closed 13 years ago

MediaEngineDefault.cpp:236:12: warning: converting to non-pointer type ‘nsresult {aka unsigned int}’ from NULL [-Wconversion-null]

Categories

(Core :: Audio/Video, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

{ mozilla/content/media/MediaEngineDefault.cpp:236:12: warning: converting to non-pointer type ‘nsresult {aka unsigned int}’ from NULL [-Wconversion-null] mozilla/content/media/MediaEngineDefault.cpp:241:12: warning: converting to non-pointer type ‘nsresult {aka unsigned int}’ from NULL [-Wconversion-null] } Code snippet: 232 nsresult 233 MediaEngineDefaultAudioSource::Start(SourceMediaStream* aStream, TrackID aID) 234 { 235 if (mState != kAllocated) { 236 return NULL; 237 } 238 239 mTimer = do_CreateInstance(NS_TIMER_CONTRACTID); 240 if (!mTimer) { 241 return NULL; 242 } 243 http://mxr.mozilla.org/mozilla-central/source/content/media/MediaEngineDefault.cpp?mark=232-232,236-236,241-241#232 Not sure what we want to return here, but NULL is not correct, as it's not a nsresult.
(This is in a new file added a few weeks ago in bug 752351, "Implement fallback MediaEngine backend")
I fixed this in the first patch for bug 691234, but I'll leave this bug open until it has been reviewed and landed.
Depends on: 691234
The fix in Bug 691234 landed and still seems to be in the file, so marking as fixed.
Status: NEW → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.