summaryrefslogtreecommitdiffstats
path: root/jni
diff options
context:
space:
mode:
authorDan Albert <danalbert@google.com>2016-07-26 15:06:10 -0700
committerArne Coucheron <arco68@gmail.com>2018-11-10 23:57:27 +0100
commita78f0af27ea899a10e8515c4dca8bc4ead2bd155 (patch)
treeed85675d399c58c3045171317e0ee81e7f19a0d6 /jni
parent8dfa3a7cc79cf04769e57b1e997afade7799a966 (diff)
downloadandroid_packages_apps_Gallery2-a78f0af27ea899a10e8515c4dca8bc4ead2bd155.tar.gz
android_packages_apps_Gallery2-a78f0af27ea899a10e8515c4dca8bc4ead2bd155.tar.bz2
android_packages_apps_Gallery2-a78f0af27ea899a10e8515c4dca8bc4ead2bd155.zip
Add missing includes.
These files all use malloc/free but never include it. It looks like the NDK headers leak stdlib.h through something that was being included, but the updated headers don't have that mess. Test: mma Change-Id: Ia34a2d74f382f88476708e31da819ea18ab0aa4f
Diffstat (limited to 'jni')
-rw-r--r--jni/filters/geometry.c4
-rw-r--r--jni/filters/highlight.c2
-rw-r--r--jni/filters/redEyeMath.c2
-rw-r--r--jni/filters/shadows.c2
-rw-r--r--jni/filters/wbalance.c2
5 files changed, 11 insertions, 1 deletions
diff --git a/jni/filters/geometry.c b/jni/filters/geometry.c
index 9fbf7334c..8e5e7418b 100644
--- a/jni/filters/geometry.c
+++ b/jni/filters/geometry.c
@@ -14,8 +14,10 @@
* limitations under the License.
*/
-#include "filters.h"
#include <stdio.h>
+#include <stdlib.h>
+
+#include "filters.h"
static __inline__ void flipVertical(char * source, int srcWidth, int srcHeight, char * destination, int dstWidth, int dstHeight){
//Vertical
diff --git a/jni/filters/highlight.c b/jni/filters/highlight.c
index 2d49e6baa..f9e46650c 100644
--- a/jni/filters/highlight.c
+++ b/jni/filters/highlight.c
@@ -15,6 +15,8 @@
*/
#include <math.h>
+#include <stdlib.h>
+
#include "filters.h"
void JNIFUNCF(ImageFilterHighlights, nativeApplyFilter, jobject bitmap,
diff --git a/jni/filters/redEyeMath.c b/jni/filters/redEyeMath.c
index d0885631e..1942d691e 100644
--- a/jni/filters/redEyeMath.c
+++ b/jni/filters/redEyeMath.c
@@ -15,6 +15,8 @@
*/
#include <math.h>
+#include <stdlib.h>
+
#include "filters.h"
int value(int r, int g, int b) {
diff --git a/jni/filters/shadows.c b/jni/filters/shadows.c
index af3dba470..ee4621cf2 100644
--- a/jni/filters/shadows.c
+++ b/jni/filters/shadows.c
@@ -15,6 +15,8 @@
*/
#include <math.h>
+#include <stdlib.h>
+
#include "filters.h"
void JNIFUNCF(ImageFilterShadows, nativeApplyFilter, jobject bitmap, jint width, jint height, float scale){
diff --git a/jni/filters/wbalance.c b/jni/filters/wbalance.c
index 3e1eac64c..78271cd6b 100644
--- a/jni/filters/wbalance.c
+++ b/jni/filters/wbalance.c
@@ -14,6 +14,8 @@
* limitations under the License.
*/
+#include <stdlib.h>
+
#include "filters.h"
void estmateWhite(unsigned char *src, int len, int *wr, int *wb, int *wg){