Bug 754643 - Enable FAIL_ON_WARNINGS in content/media; r=cpearce f=roc

This commit is contained in:
Ms2ger 2012-05-18 10:29:38 +02:00
parent 495c4878c8
commit 1c8f2530d8
12 changed files with 33 additions and 22 deletions

View File

@ -123,6 +123,7 @@ public:
*/
void WriteTo(nsAudioStream* aOutput);
using MediaSegmentBase<AudioSegment, AudioChunk>::AppendFrom;
void AppendFrom(AudioSegment* aSource)
{
NS_ASSERTION(aSource->mChannels == mChannels, "Non-matching channels");

View File

@ -38,6 +38,7 @@ DEPTH = ../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk

View File

@ -6,6 +6,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk

View File

@ -436,9 +436,9 @@ nsBuiltinDecoderStateMachine::nsBuiltinDecoderStateMachine(nsBuiltinDecoder* aDe
mDispatchedRunEvent(false),
mDecodeThreadWaiting(false),
mRealTime(aRealTime),
mRequestedNewDecodeThread(false),
mDidThrottleAudioDecoding(false),
mDidThrottleVideoDecoding(false),
mRequestedNewDecodeThread(false),
mEventManager(aDecoder)
{
MOZ_COUNT_CTOR(nsBuiltinDecoderStateMachine);
@ -539,7 +539,7 @@ void nsBuiltinDecoderStateMachine::SendOutputStreamAudio(AudioData* aAudio,
aStream->mLastAudioPacketTime = aAudio->mTime;
aStream->mLastAudioPacketEndTime = aAudio->GetEnd();
NS_ASSERTION(aOutput->GetChannels() == aAudio->mChannels,
NS_ASSERTION(aOutput->GetChannels() == PRInt32(aAudio->mChannels),
"Wrong number of channels");
// This logic has to mimic AudioLoop closely to make sure we write
@ -635,7 +635,6 @@ void nsBuiltinDecoderStateMachine::SendOutputStreamData()
AudioSegment output;
output.Init(mInfo.mAudioChannels);
for (PRUint32 i = 0; i < audio.Length(); ++i) {
AudioData* a = audio[i];
SendOutputStreamAudio(audio[i], stream, &output);
}
if (output.GetDuration() > 0) {

View File

@ -38,6 +38,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk

View File

@ -45,6 +45,9 @@
#include "nsBuiltinDecoderReader.h"
#include "mozilla/StandardInteger.h"
#include "mozilla/Util.h" // DebugOnly
using namespace mozilla;
#ifdef PR_LOGGING
extern PRLogModuleInfo* gBuiltinDecoderLog;
@ -921,7 +924,7 @@ nsresult nsOpusState::PageIn(ogg_page* aPage)
void nsOpusState::ReconstructGranulepos(void)
{
NS_ASSERTION(mUnstamped.Length() > 0, "Must have unstamped packets");
ogg_packet* last = mUnstamped[mUnstamped.Length()-1];
DebugOnly<ogg_packet*> last = mUnstamped[mUnstamped.Length()-1];
NS_ASSERTION(last->e_o_s || last->granulepos > 0,
"Must know last granulepos!");

View File

@ -451,7 +451,7 @@ nsresult nsOggReader::DecodeOpus(ogg_packet* aPacket) {
PRInt32 goodFrames = frames - skip;
NS_ASSERTION(goodFrames > 0, "endTime calculation was wrong");
nsAutoArrayPtr<AudioDataValue> goodBuffer(new AudioDataValue[goodFrames * channels]);
for (int i = 0; i < goodFrames*channels; i++)
for (PRInt32 i = 0; i < goodFrames * PRInt32(channels); i++)
goodBuffer[i] = buffer[skip*channels + i];
startTime = mOpusState->Time(endFrame - goodFrames);

View File

@ -36,27 +36,28 @@
# ***** END LICENSE BLOCK *****
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk
MODULE = content
LIBRARY_NAME = gkconraw_s
LIBXUL_LIBRARY = 1
MODULE = content
LIBRARY_NAME = gkconraw_s
LIBXUL_LIBRARY = 1
EXPORTS += \
nsRawDecoder.h \
nsRawReader.h \
nsRawStructs.h \
$(NULL)
EXPORTS += \
nsRawDecoder.h \
nsRawReader.h \
nsRawStructs.h \
$(NULL)
CPPSRCS += \
nsRawDecoder.cpp \
nsRawReader.cpp \
$(NULL)
CPPSRCS += \
nsRawDecoder.cpp \
nsRawReader.cpp \
$(NULL)
FORCE_STATIC_LIB = 1

View File

@ -39,6 +39,7 @@ topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
relativesrcdir = content/media/test
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk
include $(topsrcdir)/config/rules.mk

View File

@ -38,6 +38,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk

View File

@ -38,6 +38,7 @@ DEPTH = ../../..
topsrcdir = @top_srcdir@
srcdir = @srcdir@
VPATH = @srcdir@
FAIL_ON_WARNINGS = 1
include $(DEPTH)/config/autoconf.mk

View File

@ -1,4 +1,4 @@
/* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* ***** BEGIN LICENSE BLOCK *****
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
*
@ -383,6 +383,7 @@ public:
tmp->_field.Clear();
#define NS_IMPL_CYCLE_COLLECTION_UNLINK_END \
(void)tmp; \
return NS_OK; \
}