Skip to content

Commit

Permalink
Fixed all warnings regarding rrex4
Browse files Browse the repository at this point in the history
  • Loading branch information
GerbenAaltink committed Sep 24, 2024
1 parent 45d66a6 commit 6539f44
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
8 changes: 4 additions & 4 deletions rrex4.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ bool r4_match_stats(char *str, char *expr) {
return result;
}

char test_r4_bug_check_capture_overflow(){
void test_r4_bug_check_capture_overflow(){
// This is a former bug in r4.

// Case one
Expand All @@ -125,7 +125,7 @@ char test_r4_bug_check_capture_overflow(){
r4_free(r);
}

char test_r4_capture_main_group() {
void test_r4_capture_main_group() {
// Case 1
r4_t * r = r4("testtesttesttest","(test)+test$");
//printf("%s\n",r->match);
Expand Down Expand Up @@ -165,9 +165,9 @@ char test_r4_capture_dynamic_amount(){
r4_free(r);
}

int main(unsigned int argc, char * argv[]) {
int main(int argc, char * argv[]) {

for(unsigned int i = 0; i < argc; i++){
for(int i = 0; i < argc; i++){
if(!strcmp(argv[i],"--debug")){
r4_enable_debug();
}
Expand Down
5 changes: 2 additions & 3 deletions rrex4.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@ static char *_format_function_name(const char *name) {
}

#define DEBUG_VALIDATE_FUNCTION \
\
if (_r4_debug || r4->debug) \
printf("DEBUG: %s %s <%s> \"%s\"\n", _format_function_name(__func__), \
r4->valid ? "valid" : "INVALID", r4->expr, r4->str);
Expand Down Expand Up @@ -550,7 +549,7 @@ static void r4_match_add(r4_t *r4, char *extracted) {
r4->match_count++;
}

static void r4_validate_word_boundary_start(r4_t *r4) {
static bool r4_validate_word_boundary_start(r4_t *r4) {
DEBUG_VALIDATE_FUNCTION
r4->expr++;
if (!r4->valid) {
Expand All @@ -563,7 +562,7 @@ static void r4_validate_word_boundary_start(r4_t *r4) {
}
return r4_validate(r4);
}
static void r4_validate_word_boundary_end(r4_t *r4) {
static bool r4_validate_word_boundary_end(r4_t *r4) {
DEBUG_VALIDATE_FUNCTION
r4->expr++;
if (!r4->valid) {
Expand Down

0 comments on commit 6539f44

Please sign in to comment.