Skip to content

Commit

Permalink
Bug 1098134 - Fix or suppress warnings in gmp-api, gmp-clearkey, and …
Browse files Browse the repository at this point in the history
…gmp-plugin and mark as FAIL_ON_WARNINGS. r=cpearce
  • Loading branch information
cpeterso committed Oct 22, 2014
1 parent e8440ca commit afa32e1
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 0 deletions.
2 changes: 2 additions & 0 deletions dom/media/gmp-plugin/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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
6 changes: 6 additions & 0 deletions dom/media/gmp/gmp-api/gmp-decryption.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@

class GMPEncryptedBufferMetadata {
public:
virtual ~GMPEncryptedBufferMetadata() {}

// Key ID to identify the decryption key.
virtual const uint8_t* KeyId() const = 0;

Expand Down Expand Up @@ -94,6 +96,8 @@ typedef int64_t GMPTimestamp;
// Callbacks to be called from the CDM. Threadsafe.
class GMPDecryptorCallback {
public:
virtual ~GMPDecryptorCallback() {}

// Resolves a promise for a session created.
// Passes the session id to be exposed to JavaScript.
// Must be called before SessionMessage().
Expand Down Expand Up @@ -182,6 +186,7 @@ class GMPDecryptorCallback {
// Host interface, passed to GetAPIFunc(), with "decrypt".
class GMPDecryptorHost {
public:
virtual ~GMPDecryptorHost() {}

// Returns an origin specific string uniquely identifying the device.
// The node id contains a random component, and is consistent between
Expand Down Expand Up @@ -213,6 +218,7 @@ enum GMPSessionType {
// Host API: GMPDecryptorHost
class GMPDecryptor {
public:
virtual ~GMPDecryptor() {}

// Sets the callback to use with the decryptor to return results
// to Gecko.
Expand Down
17 changes: 17 additions & 0 deletions media/gmp-clearkey/0.1/moz.build
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit afa32e1

Please sign in to comment.