Bug 823921 - Fixed GCC warnings r=paul

This commit is contained in:
Jacek Caban 2012-12-26 11:27:28 +01:00
parent 353b341de4
commit c0e323b909
5 changed files with 14 additions and 16 deletions

View File

@ -35,9 +35,9 @@ DoGetInterface(IUnknown* aUnknown, void** aInterface)
WMFByteStream::WMFByteStream(MediaResource* aResource)
: mWorkQueueId(MFASYNC_CALLBACK_QUEUE_UNDEFINED),
mResource(aResource),
mReentrantMonitor("WMFByteStream"),
mOffset(0),
mResource(aResource)
mOffset(0)
{
NS_ASSERTION(NS_IsMainThread(), "Must be on main thread.");
NS_ASSERTION(mResource, "Must have a valid media resource");
@ -104,11 +104,11 @@ WMFByteStream::QueryInterface(REFIID aIId, void **aInterface)
return E_NOINTERFACE;
}
NS_IMPL_THREADSAFE_ADDREF(WMFByteStream);
NS_IMPL_THREADSAFE_RELEASE(WMFByteStream);
NS_IMPL_THREADSAFE_ADDREF(WMFByteStream)
NS_IMPL_THREADSAFE_RELEASE(WMFByteStream)
NS_IMPL_THREADSAFE_ADDREF(WMFByteStream::AsyncReadRequestState);
NS_IMPL_THREADSAFE_RELEASE(WMFByteStream::AsyncReadRequestState);
NS_IMPL_THREADSAFE_ADDREF(WMFByteStream::AsyncReadRequestState)
NS_IMPL_THREADSAFE_RELEASE(WMFByteStream::AsyncReadRequestState)
// IUnknown Methods
STDMETHODIMP

View File

@ -11,6 +11,7 @@
#include "nsISupportsImpl.h"
#include "nsCOMPtr.h"
#include "mozilla/ReentrantMonitor.h"
#include "mozilla/Attributes.h"
#include "nsAutoPtr.h"
namespace mozilla {
@ -22,8 +23,8 @@ class MediaResource;
// on which blocking I/O is performed. The SourceReader requests reads
// asynchronously using {Begin,End}Read(). The synchronous I/O methods aren't
// used by the SourceReader, so they're not implemented on this class.
class WMFByteStream : public IMFByteStream,
public IMFAsyncCallback
class WMFByteStream MOZ_FINAL : public IMFByteStream,
public IMFAsyncCallback
{
public:
WMFByteStream(MediaResource* aResource);
@ -77,7 +78,7 @@ private:
DWORD mWorkQueueId;
// Stores data regarding an async read opreation.
class AsyncReadRequestState : public IUnknown {
class AsyncReadRequestState MOZ_FINAL : public IUnknown {
public:
AsyncReadRequestState(int64_t aOffset, BYTE* aBuffer, ULONG aLength)
: mOffset(aOffset),
@ -98,7 +99,7 @@ private:
// IUnknown ref counting.
nsAutoRefCnt mRefCnt;
NS_DECL_OWNINGTHREAD;
NS_DECL_OWNINGTHREAD
};
// Resource we're wrapping. Note this object's methods are threadsafe,
@ -117,7 +118,7 @@ private:
// IUnknown ref counting.
nsAutoRefCnt mRefCnt;
NS_DECL_OWNINGTHREAD;
NS_DECL_OWNINGTHREAD
};
} // namespace mozilla

View File

@ -90,7 +90,6 @@ WMFDecoder::UnloadDLLs()
bool IsWindows7OrLater()
{
OSVERSIONINFO versionInfo;
BOOL isWin7OrLater = FALSE;
versionInfo.dwOSVersionInfoSize = sizeof (OSVERSIONINFO);
if (!GetVersionEx(&versionInfo)) {
return false;

View File

@ -52,10 +52,10 @@ WMFReader::~WMFReader()
// Note: We must shutdown the byte stream before calling MFShutdown, else we
// get assertion failures when unlocking the byte stream's work queue.
if (mByteStream) {
nsresult rv = mByteStream->Shutdown();
DebugOnly<nsresult> rv = mByteStream->Shutdown();
NS_ASSERTION(NS_SUCCEEDED(rv), "Failed to shutdown WMFByteStream");
}
HRESULT hr = wmf::MFShutdown();
DebugOnly<HRESULT> hr = wmf::MFShutdown();
NS_ASSERTION(SUCCEEDED(hr), "MFShutdown failed");
MOZ_COUNT_DTOR(WMFReader);
}

View File

@ -203,8 +203,6 @@ namespace wmf {
static bool sDLLsLoaded = false;
static bool sFailedToLoadDlls = false;
static HMODULE sMfPlatMod = NULL;
struct WMFModule {
const char* name;
HMODULE handle;