Commit ef695613 authored by Fabian Müller's avatar Fabian Müller
Browse files

Move unreachable code into switch-case

parent 8625b3d0
Loading
Loading
Loading
Loading
+6 −10
Original line number Diff line number Diff line
@@ -3304,13 +3304,11 @@ static void *getInputByIndex( void *inputsArray, const size_t index, const IVAS_
        case IVAS_REND_AUDIO_CONFIG_TYPE_MASA:
            return (input_masa *) inputsArray + index;
        default:
            break;
    }

            /* this should be unreachable */
            assert( 0 );
            return NULL;
    }
}

/* Const variant of getInputByIndex. Unfortunately, this duplication is required to keep const-correctness. */
static const void *getConstInputByIndex( const void *inputsArray, const size_t index, const IVAS_REND_AudioConfigType inputType )
@@ -3326,13 +3324,11 @@ static const void *getConstInputByIndex( const void *inputsArray, const size_t i
        case IVAS_REND_AUDIO_CONFIG_TYPE_MASA:
            return (const input_masa *) inputsArray + index;
        default:
            break;
    }

            /* this should be unreachable */
            assert( 0 );
            return NULL;
    }
}

static ivas_error findFreeInputSlot(
    const void *inputs,