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

Unverified Commit 452229bf authored by Chih-Hung Hsieh's avatar Chih-Hung Hsieh Committed by Michael Bestas
Browse files

Fix sizeof warnings on malloc

Although sizeof(short) and sizeof(unsigned short)
should have the same value; use the correct type
to suppress the warning.

Bug: 261919363
Test: make tidy-packages-apps-Gallery2-jni_subset
Change-Id: I8244fe20e613d0dea2a74753deec64346d5e9f5b
parent d04da699
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -27,7 +27,7 @@ void JNIFUNCF(ImageFilterHighlights, nativeApplyFilter, jobject bitmap,
    int i;
    int len = width * height * 4;
    jfloat* lum = (*env)->GetFloatArrayElements(env, luminanceMap,0);
    unsigned short * hsv = (unsigned short *)malloc(3*sizeof(short));
    unsigned short * hsv = (unsigned short *)malloc(3*sizeof(unsigned short));

    for (i = 0; i < len; i+=4)
    {
+1 −1
Original line number Diff line number Diff line
@@ -40,7 +40,7 @@ void JNIFUNCF(ImageFilterShadows, nativeApplyFilter, jobject bitmap, jint width,
        poly[i] = fastevalPoly(shadowFilterMap+i*2,2 , s);
    }

    unsigned short * hsv = (unsigned short *)malloc(3*sizeof(short));
    unsigned short * hsv = (unsigned short *)malloc(3*sizeof(unsigned short));

    for (i = 0; i < len; i+=4)
    {