summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-07-26 15:05:35 -0700
committerArne Coucheron <arco68@gmail.com>2017-12-16 06:51:21 +0100
commit7821403d88f35e5cd904fb9ad762afd75d9a1701 (patch)
treecbb572f9b4091a6719c394748d4e2835fb1250e6 /jni
parent19c34a38c86d4526aad4e37b5ed03da74751a4b8 (diff)
downloadandroid_packages_apps_Gallery2-7821403d88f35e5cd904fb9ad762afd75d9a1701.tar.gz
android_packages_apps_Gallery2-7821403d88f35e5cd904fb9ad762afd75d9a1701.tar.bz2
android_packages_apps_Gallery2-7821403d88f35e5cd904fb9ad762afd75d9a1701.zip
Cleanup warnings in jni.
Test: mma Change-Id: I1a3997525427258d628a7c59528c758070ab5f82
Diffstat (limited to 'jni')
-rw-r--r--jni/Android.mk4
-rw-r--r--jni/filters/filters.h4
-rw-r--r--jni/filters/geometry.c6
3 files changed, 6 insertions, 8 deletions
diff --git a/jni/Android.mk b/jni/Android.mk
index 1a45a90be..a3794af5a 100644
--- a/jni/Android.mk
+++ b/jni/Android.mk
@@ -2,7 +2,7 @@ LOCAL_PATH:= $(call my-dir)
include $(CLEAR_VARS)
-LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES
+LOCAL_CFLAGS += -DEGL_EGLEXT_PROTOTYPES -Wno-unused-parameter
LOCAL_SRC_FILES := jni_egl_fence.cpp
@@ -44,7 +44,7 @@ LOCAL_SRC_FILES := filters/gradient.c \
filters/tinyplanet.cc \
filters/kmeans.cc
-LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops
+LOCAL_CFLAGS += -ffast-math -O3 -funroll-loops -Wno-unused-parameter
LOCAL_LDLIBS := -llog -ljnigraphics
LOCAL_ARM_MODE := arm
diff --git a/jni/filters/filters.h b/jni/filters/filters.h
index a63ef2097..fbfc182de 100644
--- a/jni/filters/filters.h
+++ b/jni/filters/filters.h
@@ -44,8 +44,8 @@ typedef unsigned int Color;
#define ALPHA (i+3)
#define CLAMP(c) (MAX(0, MIN(255, c)))
-__inline__ unsigned char clamp(int c);
-__inline__ int clampMax(int c,int max);
+extern unsigned char clamp(int c);
+extern int clampMax(int c,int max);
extern void rgb2hsv( unsigned char *rgb,int rgbOff,unsigned short *hsv,int hsvOff);
extern void hsv2rgb(unsigned short *hsv,int hsvOff,unsigned char *rgb,int rgbOff);
diff --git a/jni/filters/geometry.c b/jni/filters/geometry.c
index b308213c6..84a044c5a 100644
--- a/jni/filters/geometry.c
+++ b/jni/filters/geometry.c
@@ -75,10 +75,8 @@ static __inline__ void rotate90(char * source, int srcWidth, int srcHeight, char
int width = cpy_bytes * srcWidth;
int length = srcHeight;
int total = length * width;
- int i = 0;
- int j = 0;
- for (j = 0; j < length * cpy_bytes; j+= cpy_bytes){
- for (i = 0; i < width; i+=cpy_bytes){
+ for (size_t j = 0; j < length * cpy_bytes; j+= cpy_bytes){
+ for (int i = 0; i < width; i+=cpy_bytes){
int column_disp = (width - cpy_bytes - i) * length;
int row_disp = j;
memcpy(destination + column_disp + row_disp , source + j * srcWidth + i, cpy_bytes);