Merge commit '4ac8eeef637f1a9e28f65ff1d9ffb3b742a5030d' into HEAD
Change-Id: I882d13686bf2ce28ec8c6b1611fbce64f0bd61a9
diff --git a/jni/Android.mk b/jni/Android.mk
index 8b81627..37213bc 100755
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -10,6 +10,20 @@
$(LOCAL_PATH)/feature_mos/src/mosaic
LOCAL_CFLAGS := -O3 -DNDEBUG
+LOCAL_CFLAGS += -Wall -Werror
+# suppress existing non-critical warnings
+LOCAL_CFLAGS += \
+ -Wno-gnu-static-float-init \
+ -Wno-non-literal-null-conversion \
+ -Wno-self-assign \
+ -Wno-unused-parameter \
+ -Wno-unused-variable \
+ -Wno-unused-function \
+
+# some warnings should be fixed
+LOCAL_CFLAGS += \
+ -Wno-error=sometimes-uninitialized \
+
LOCAL_CPPFLAGS := -std=gnu++98
LOCAL_SRC_FILES := \
diff --git a/jni/feature_mos/src/mosaic/Blend.cpp b/jni/feature_mos/src/mosaic/Blend.cpp
index e37755d..5619462 100644
--- a/jni/feature_mos/src/mosaic/Blend.cpp
+++ b/jni/feature_mos/src/mosaic/Blend.cpp
@@ -792,7 +792,7 @@
delete b[j];
}
- delete b;
+ delete [] b;
return BLEND_RET_OK;
}
diff --git a/jni/feature_mos/src/mosaic/ImageUtils.h b/jni/feature_mos/src/mosaic/ImageUtils.h
index 8778238..92965ca 100644
--- a/jni/feature_mos/src/mosaic/ImageUtils.h
+++ b/jni/feature_mos/src/mosaic/ImageUtils.h
@@ -47,7 +47,7 @@
/**
* Definition of an empty image.
*/
- static const int IMAGE_TYPE_NOIMAGE = NULL;
+ static const int IMAGE_TYPE_NOIMAGE = 0;
/**
* Convert image from BGR (interlaced) to YVU (non-interlaced)
diff --git a/jni/feature_mos/src/mosaic_renderer/WarpRenderer.cpp b/jni/feature_mos/src/mosaic_renderer/WarpRenderer.cpp
index af6779a..2bcffcf 100755
--- a/jni/feature_mos/src/mosaic_renderer/WarpRenderer.cpp
+++ b/jni/feature_mos/src/mosaic_renderer/WarpRenderer.cpp
@@ -35,6 +35,10 @@
WarpRenderer::WarpRenderer() : Renderer()
{
+ // suppress warnings of unused private fields
+ (void) mTexHandle;
+ (void) mTexCoordHandle;
+ (void) mTriangleVerticesHandle;
}
WarpRenderer::~WarpRenderer() {