Skip to content
This repository was archived by the owner on Jun 1, 2023. It is now read-only.

Commit

Permalink
enum: fix c++ -Wextra warning with enum
Browse files Browse the repository at this point in the history
warning: enumeral and non-enumeral type in conditional expression [-Wextra]
in get_break_val_cp_checked()
cast it to an int.
rurban committed Jun 22, 2017
1 parent d0138d3 commit f05f0b3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion regexec.c
Original file line number Diff line number Diff line change
@@ -1763,7 +1763,7 @@ static Size_t
S_get_break_val_cp_checked(SV* const invlist, const UV cp_in) {
SSize_t cp_out = Perl__invlist_search(invlist, cp_in);
assert(cp_out >= 0);
return cp_out >= 0 ? (Size_t)cp_out : LB_EDGE;
return cp_out >= 0 ? (Size_t)cp_out : (Size_t)(int)LB_EDGE;
}
#define _generic_GET_BREAK_VAL_CP_CHECKED(invlist, invmap, cp) \
invmap[S_get_break_val_cp_checked(invlist, cp)]

0 comments on commit f05f0b3

Please sign in to comment.