LOCAL_MODULE := libjni_tinyplanet
LOCAL_SRC_FILES := tinyplanet.cc
-LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)
# JpegUtil
include $(CLEAR_VARS)
-LOCAL_CFLAGS := -std=c++11
LOCAL_NDK_STL_VARIANT := c++_static
LOCAL_LDFLAGS := -llog -ldl -ljnigraphics
LOCAL_SDK_VERSION := 17
LOCAL_STATIC_LIBRARIES := libjpeg_static_ndk
-LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS := -std=c++11
+LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -Wall -Wextra -Werror
LOCAL_ARM_MODE := arm
include $(BUILD_SHARED_LIBRARY)
return true;
};
- dest.term_destination = [](j_compress_ptr cinfo) {
+ dest.term_destination = [](j_compress_ptr cinfo __unused) {
// do nothing to terminate the output buffer
};
const Plane cbP = {width / 2, height / 2, cbBuf, cbPStride, cbRStride};
const Plane crP = {width / 2, height / 2, crBuf, crPStride, crRStride};
- auto flush = [](size_t numBytes) {
+ auto flush = [](size_t numBytes __unused) {
// do nothing
};
const std::array<unsigned char*, ROWS> jpegutil::RowIterator<ROWS>::LoadAt(
int y_base) {
std::array<unsigned char*, ROWS> buf_ptrs;
- for (int i = 0; i < ROWS; i++) {
+ for (unsigned int i = 0; i < ROWS; i++) {
buf_ptrs[i] = &buf_[padded_row_length_ * i];
}
return buf_ptrs;
}
- for (int i = 0; i < ROWS; i++) {
+ for (unsigned int i = 0; i < ROWS; i++) {
int y = i + y_base;
y = min(y, transform_.output_height() - 1);
*/
extern "C" JNIEXPORT jint JNICALL
Java_com_android_camera_util_JpegUtilNative_compressJpegFromYUV420pNative(
- JNIEnv* env, jclass clazz,
+ JNIEnv* env, jclass clazz __unused,
/** Input image dimensions */
jint width, jint height,
/** Y Plane */
*/
extern "C" JNIEXPORT void JNICALL
Java_com_android_camera_util_JpegUtilNative_copyImagePlaneToBitmap(
- JNIEnv* env, jclass clazz, jint width, jint height, jobject planeBuf,
+ JNIEnv* env, jclass clazz __unused, jint width, jint height, jobject planeBuf,
jint pStride, jint rStride, jobject outBitmap, jint rot90) {
jbyte* src = (jbyte*)env->GetDirectBufferAddress(planeBuf);
}
-JNIEXPORT void JNICALL Java_com_android_camera_tinyplanet_TinyPlanetNative_process(JNIEnv* env, jobject obj, jobject bitmap_in, jint width, jint height, jobject bitmap_out, jint output_size, jfloat scale, jfloat angle)
+JNIEXPORT void JNICALL Java_com_android_camera_tinyplanet_TinyPlanetNative_process(JNIEnv* env,
+ jobject obj __unused, jobject bitmap_in, jint width, jint height, jobject bitmap_out,
+ jint output_size, jfloat scale, jfloat angle)
{
char* source = 0;
char* destination = 0;