Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 53390e1e authored by Pablo Ceballos's avatar Pablo Ceballos
Browse files

libgui/SF: Fix some code warnings

A couple of fixes to satisfy the Eclipse static code analysis tool.
- Initialize all members in constructors
- Remove unused forward declarations
- Add parentheses when combining logical and bitwise operators
- Fix a case statement with no break (it was intentional)

Change-Id: Icecb8cc98c6f58b97ab33fffb621f0edc33a7d3c
parent 7d226163
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -38,7 +38,8 @@ namespace android {
Sensor::Sensor()
    : mHandle(0), mType(0),
      mMinValue(0), mMaxValue(0), mResolution(0),
      mPower(0), mMinDelay(0), mFifoReservedEventCount(0), mFifoMaxEventCount(0),
      mPower(0), mMinDelay(0), mVersion(0), mFifoReservedEventCount(0),
      mFifoMaxEventCount(0), mRequiredAppOp(0),
      mMaxDelay(0), mFlags(0)
{
}
+3 −3
Original line number Diff line number Diff line
@@ -310,9 +310,9 @@ status_t Composer::setFlags(const sp<SurfaceComposerClient>& client,
    layer_state_t* s = getLayerStateLocked(client, id);
    if (!s)
        return BAD_INDEX;
    if (mask & layer_state_t::eLayerOpaque ||
            mask & layer_state_t::eLayerHidden ||
            mask & layer_state_t::eLayerSecure) {
    if ((mask & layer_state_t::eLayerOpaque) ||
            (mask & layer_state_t::eLayerHidden) ||
            (mask & layer_state_t::eLayerSecure)) {
        s->what |= layer_state_t::eFlagsChanged;
    }
    s->flags &= ~mask;
+0 −8
Original line number Diff line number Diff line
@@ -444,14 +444,6 @@ void checkAnyBuffer(const CpuConsumer::LockedBuffer &buf, int format) {
    }
}

void fillYV12BufferRect(uint8_t* buf, int w, int h, int stride,
        const android_native_rect_t& rect);

void fillRGBA8Buffer(uint8_t* buf, int w, int h, int stride);

void fillRGBA8BufferSolid(uint8_t* buf, int w, int h, int stride, uint8_t r,
        uint8_t g, uint8_t b, uint8_t a);

// Configures the ANativeWindow producer-side interface based on test parameters
void configureANW(const sp<ANativeWindow>& anw,
        const CpuConsumerTestParams& params,
+3 −1
Original line number Diff line number Diff line
@@ -35,9 +35,11 @@ public:

protected:
    GLTest() :
            mDisplaySecs(0),
            mEglDisplay(EGL_NO_DISPLAY),
            mEglSurface(EGL_NO_SURFACE),
            mEglContext(EGL_NO_CONTEXT) {
            mEglContext(EGL_NO_CONTEXT),
            mGlConfig(NULL) {
    }

    virtual void SetUp();
+2 −1
Original line number Diff line number Diff line
@@ -37,7 +37,8 @@ protected:
    SurfaceTextureClientTest():
            mEglDisplay(EGL_NO_DISPLAY),
            mEglSurface(EGL_NO_SURFACE),
            mEglContext(EGL_NO_CONTEXT) {
            mEglContext(EGL_NO_CONTEXT),
            mEglConfig(NULL) {
    }

    virtual void SetUp() {
Loading