Bug 1204772 - Fix warnings in widget/gonk/libdisplay. r=mwu.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 16 Sep 2015 23:01:27 -0700
changeset 295602 dbac0162aeea03297b247a15d3c17751ad035960
parent 295582 895c0969f99ed11c61bda11e390b5403a3e01874
child 295603 800c270461494640eba7ee5f0f66c8290200375a
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmwu
bugs1204772
milestone43.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1204772 - Fix warnings in widget/gonk/libdisplay. r=mwu. dump() has only one instance, which is empty, and no uses. So just remove it. dbgCompositionTypeStr()'s use depends on conditional constants, so just marking it with the unused attribute is the fix for that warning.
widget/gonk/libdisplay/VirtualDisplaySurface.cpp
widget/gonk/libdisplay/VirtualDisplaySurface.h
widget/gonk/libdisplay/moz.build
--- a/widget/gonk/libdisplay/VirtualDisplaySurface.cpp
+++ b/widget/gonk/libdisplay/VirtualDisplaySurface.cpp
@@ -29,16 +29,17 @@ static const bool sForceHwcCopy = false;
 
 #define VDS_LOGE(msg, ...) ALOGE("[%s] " msg, \
         mDisplayName.string(), ##__VA_ARGS__)
 #define VDS_LOGW_IF(cond, msg, ...) ALOGW_IF(cond, "[%s] " msg, \
         mDisplayName.string(), ##__VA_ARGS__)
 #define VDS_LOGV(msg, ...) ALOGV("[%s] " msg, \
         mDisplayName.string(), ##__VA_ARGS__)
 
+__attribute__((unused))
 static const char* dbgCompositionTypeStr(DisplaySurface::CompositionType type) {
     switch (type) {
         case DisplaySurface::COMPOSITION_UNKNOWN: return "UNKNOWN";
         case DisplaySurface::COMPOSITION_GLES:    return "GLES";
         case DisplaySurface::COMPOSITION_HWC:     return "HWC";
         case DisplaySurface::COMPOSITION_MIXED:   return "MIXED";
         default:                                  return "<INVALID>";
     }
@@ -259,19 +260,16 @@ void VirtualDisplaySurface::onFrameCommi
             mSource[SOURCE_SINK]->cancelBuffer(sslot, outFence);
         }
     }
 
     resetPerFrameState();
 #endif
 }
 
-void VirtualDisplaySurface::dump(String8& /* result */) const {
-}
-
 void VirtualDisplaySurface::resizeBuffers(const uint32_t w, const uint32_t h) {
     uint32_t tmpW, tmpH, transformHint, numPendingBuffers;
     mQueueBufferOutput.deflate(&tmpW, &tmpH, &transformHint, &numPendingBuffers);
     mQueueBufferOutput.inflate(w, h, transformHint, numPendingBuffers);
 
     mSinkBufferWidth = w;
     mSinkBufferHeight = h;
 }
--- a/widget/gonk/libdisplay/VirtualDisplaySurface.h
+++ b/widget/gonk/libdisplay/VirtualDisplaySurface.h
@@ -79,17 +79,16 @@ public:
     //
     // DisplaySurface interface
     //
     virtual status_t beginFrame(bool mustRecompose);
     virtual status_t prepareFrame(CompositionType compositionType);
     virtual status_t compositionComplete();
     virtual status_t advanceFrame();
     virtual void onFrameCommitted();
-    virtual void dump(String8& result) const;
     virtual void resizeBuffers(const uint32_t w, const uint32_t h);
 
     virtual status_t setReleaseFenceFd(int fenceFd) { return INVALID_OPERATION; }
     virtual int GetPrevDispAcquireFd() { return -1; };
 
 private:
     enum Source {SOURCE_SINK = 0, SOURCE_SCRATCH = 1};
 
--- a/widget/gonk/libdisplay/moz.build
+++ b/widget/gonk/libdisplay/moz.build
@@ -45,19 +45,16 @@ elif CONFIG['ANDROID_VERSION'] and CONFI
 Library('display')
 
 include('/ipc/chromium/chromium-config.mozbuild')
 
 FORCE_STATIC_LIB = True
 
 DEFINES['XPCOM_GLUE'] = True
 
-# XXX: We should fix these warnings.
-ALLOW_COMPILER_WARNINGS = True
-
 DISABLE_STL_WRAPPING = True
 
 CXXFLAGS += [
     '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [
         'frameworks/native/include/gui',
         'frameworks/native/opengl/include',
         'hardware/libhardware/include',
         'hardware/libhardware_legacy/include',