Bug 1098134 - Fix or suppress warnings in gmp-api, gmp-clearkey, and gmp-plugin and mark as FAIL_ON_WARNINGS. r=cpearce

This commit is contained in:
Chris Peterson 2014-11-14 00:36:20 -08:00
parent 8c03c259c1
commit cb49d7fc61
3 changed files with 26 additions and 0 deletions

View File

@ -22,3 +22,5 @@ USE_STATIC_LIBS = True
NO_VISIBILITY_FLAGS = True
# Don't use STL wrappers; this isn't Gecko code
DISABLE_STL_WRAPPING = True
FAIL_ON_WARNINGS = True

View File

@ -39,6 +39,8 @@ public:
virtual const uint16_t* ClearBytes() const = 0;
virtual const uint32_t* CipherBytes() const = 0;
virtual ~GMPEncryptedBufferMetadata() {}
};
class GMPBuffer {
@ -177,6 +179,8 @@ public:
// Returns decrypted buffer to Gecko, or reports failure.
virtual void Decrypted(GMPBuffer* aBuffer, GMPErr aResult) = 0;
virtual ~GMPDecryptorCallback() {}
};
// Host interface, passed to GetAPIFunc(), with "decrypt".
@ -187,6 +191,8 @@ public:
virtual void GetPluginVoucher(const uint8_t** aVoucher,
uint32_t* aVoucherLength) = 0;
virtual ~GMPDecryptorHost() {}
};
enum GMPSessionType {
@ -265,6 +271,7 @@ public:
// Do not call the GMPDecryptorCallback's functions after this is called.
virtual void DecryptingComplete() = 0;
virtual ~GMPDecryptor() {}
};
#endif // GMP_DECRYPTION_h_

View File

@ -25,3 +25,20 @@ USE_STATIC_LIBS = True
DISABLE_STL_WRAPPING = True
DEFINES['MOZ_NO_MOZALLOC'] = True
# Suppress warnings in third-party code.
if CONFIG['GNU_CXX']:
CFLAGS += [
'-Wno-missing-braces',
'-Wno-pointer-to-int-cast',
'-Wno-sign-compare',
'-include stdio.h', # for sprintf() prototype
'-include unistd.h', # for getpid() prototype
]
elif CONFIG['_MSC_VER']:
CFLAGS += [
'-FI stdio.h', # for sprintf() prototype
'-wd4090', # '=' : different 'const' qualifiers
]
FAIL_ON_WARNINGS = True