Skip to content

Control reaches end of non-void function #349

@dkaszews

Description

@dkaszews

Trying to compile with -DFAT_RUNTIME=OFF and -DCMAKE_BUILD_TYPE=Debug, I am getting an error "Control reaches end of non-void function" in https://github.com/VectorCamp/vectorscan/blob/develop/src/nfa/limex_common_impl.h#L167-L178 which contains additional statement after an unconditional return:

static never_inline
char PROCESS_ACCEPTS_FN(const IMPL_NFA_T *limex, STATE_T *s,
                        const STATE_T *acceptMask,
                        const struct NFAAccept *acceptTable, u64a offset,
                        NfaCallback callback, void *context) {
    // We have squash masks we might have to apply after firing reports.
    STATE_T squash = ONES_STATE;
    return PROCESS_ACCEPTS_IMPL_FN(limex, s, &squash, acceptMask, acceptTable,
                                   offset, callback, context);

    *s = AND_STATE(*s, squash);
}

Compiling in release mode does not have this issue for whatever reason.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions