< prev index next >
src/java.desktop/share/native/libawt/awt/medialib/awt_ImagingLib.c
Print this page
@@ -331,11 +331,11 @@
else {
h = kheight;
}
dkern = NULL;
- if (SAFE_TO_ALLOC_3(w, h, sizeof(mlib_d64))) {
+ if (SAFE_TO_ALLOC_3(w, h, (int)sizeof(mlib_d64))) {
dkern = (mlib_d64 *)calloc(1, w * h * sizeof(mlib_d64));
}
if (dkern == NULL) {
(*env)->ReleasePrimitiveArrayCritical(env, jdata, kern, JNI_ABORT);
return 0;
@@ -414,11 +414,11 @@
free(dkern);
return 0;
}
kdata = NULL;
- if (SAFE_TO_ALLOC_3(w, h, sizeof(mlib_s32))) {
+ if (SAFE_TO_ALLOC_3(w, h, (int)sizeof(mlib_s32))) {
kdata = (mlib_s32 *)malloc(w * h * sizeof(mlib_s32));
}
if (kdata == NULL) {
freeArray(env, srcImageP, src, sdata, dstImageP, dst, ddata);
awt_freeParsedImage(srcImageP, TRUE);
@@ -572,11 +572,11 @@
else {
h = kheight;
}
dkern = NULL;
- if (SAFE_TO_ALLOC_3(w, h, sizeof(mlib_d64))) {
+ if (SAFE_TO_ALLOC_3(w, h, (int)sizeof(mlib_d64))) {
dkern = (mlib_d64 *)calloc(1, w * h * sizeof(mlib_d64));
}
if (dkern == NULL) {
(*env)->ReleasePrimitiveArrayCritical(env, jdata, kern, JNI_ABORT);
return 0;
@@ -660,11 +660,11 @@
free(dkern);
return 0;
}
kdata = NULL;
- if (SAFE_TO_ALLOC_3(w, h, sizeof(mlib_s32))) {
+ if (SAFE_TO_ALLOC_3(w, h, (int)sizeof(mlib_s32))) {
kdata = (mlib_s32 *)malloc(w * h * sizeof(mlib_s32));
}
if (kdata == NULL) {
freeDataArray(env, srcRasterP->jdata, src, sdata,
dstRasterP->jdata, dst, ddata);
@@ -1373,17 +1373,17 @@
if (lut_nbands > ncomponents) {
lut_nbands = ncomponents;
}
tbl = NULL;
- if (SAFE_TO_ALLOC_2(ncomponents, sizeof(unsigned char *))) {
+ if (SAFE_TO_ALLOC_2(ncomponents, (int)sizeof(unsigned char *))) {
tbl = (unsigned char **)
calloc(1, ncomponents * sizeof(unsigned char *));
}
jtable = NULL;
- if (SAFE_TO_ALLOC_2(lut_nbands, sizeof(LookupArrayInfo))) {
+ if (SAFE_TO_ALLOC_2(lut_nbands, (int)sizeof(LookupArrayInfo))) {
jtable = (LookupArrayInfo *)malloc(lut_nbands * sizeof (LookupArrayInfo));
}
if (tbl == NULL || jtable == NULL) {
if (tbl != NULL) free(tbl);
< prev index next >