-
Bug
-
Resolution: Unresolved
-
P4
-
8, 11, 17
SonarCloud reports this problem:
This branch can not be reached because the condition duplicates a previous condition in the same sequence of "if/else if" statements
Here:
static int
setImageHints(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP,
int expandICM, int useAlpha,
int premultiply, mlibHintS_t *hintP)
{
...
if (dstCMP->isDefaultCompatCM) {
hintP->allocDefaultDst = FALSE;
hintP->cvtToDst = FALSE;
}
else if (dstCMP->isDefaultCompatCM) { // <---- here
hintP->allocDefaultDst = FALSE;
hintP->cvtToDst = FALSE;
}
I wonder if srcCMP->isDefaultCompatCM was meant instead.
This branch can not be reached because the condition duplicates a previous condition in the same sequence of "if/else if" statements
Here:
static int
setImageHints(JNIEnv *env, BufImageS_t *srcP, BufImageS_t *dstP,
int expandICM, int useAlpha,
int premultiply, mlibHintS_t *hintP)
{
...
if (dstCMP->isDefaultCompatCM) {
hintP->allocDefaultDst = FALSE;
hintP->cvtToDst = FALSE;
}
else if (dstCMP->isDefaultCompatCM) { // <---- here
hintP->allocDefaultDst = FALSE;
hintP->cvtToDst = FALSE;
}
I wonder if srcCMP->isDefaultCompatCM was meant instead.