X-Git-Url: https://git.saurik.com/apple/libc.git/blobdiff_plain/6465356a983ac139f81d3b7913cdb548477c346c..refs/heads/master:/regex/TRE/lib/tre-compile.c diff --git a/regex/TRE/lib/tre-compile.c b/regex/TRE/lib/tre-compile.c index 4662189..8d7a453 100644 --- a/regex/TRE/lib/tre-compile.c +++ b/regex/TRE/lib/tre-compile.c @@ -31,6 +31,9 @@ #include "tre-last-matched.h" #include "xmalloc.h" +#pragma clang diagnostic push +#pragma clang diagnostic ignored "-Wunreachable-code" + /* The bit_ffs() macro in bitstring.h is flawed. Replace it with a working one. */ @@ -1379,7 +1382,7 @@ do_addtags_recurse: #endif /* TRE_DEBUG */ DPRINT(("Reordering submatch_data\n")); - for (i = 0; i < tnfa->num_submatches; i++) + for (i = 0; i < (int)tnfa->num_submatches; i++) { #if TRE_DEBUG int so = tnfa->submatch_data[i].so_tag; @@ -1810,7 +1813,7 @@ typedef enum { static reg_errcode_t tre_expand_ast(tre_mem_t mem, tre_stack_t *stack, tre_ast_node_t *ast, int *position, tre_tag_direction_t *tag_directions, - int *max_depth) + int __unused *max_depth) { reg_errcode_t status = REG_OK; int bottom = tre_stack_num_objects(stack); @@ -3050,7 +3053,7 @@ tre_compile(regex_t *preg, const tre_char_t *regex, size_t n, int cflags, sizeof(*tag_directions) * (tnfa->num_tags + 1)); } tnfa->minimal_tags = xcalloc((unsigned)tnfa->num_tags * 2 + 3, - sizeof(tnfa->minimal_tags)); + sizeof(*tnfa->minimal_tags)); if (tnfa->minimal_tags == NULL) ERROR_EXIT(REG_ESPACE); @@ -3475,5 +3478,5 @@ tre_config(int query, void *result) } #endif /* !__LIBC__ */ - +#pragma clang diagnostic push /* EOF */