Explorar o código

ncd/modules/regex_match: fix uninitialized variable warning

ambrop7 %!s(int64=13) %!d(string=hai) anos
pai
achega
488075d8bc
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      ncd/modules/regex_match.c

+ 1 - 1
ncd/modules/regex_match.c

@@ -260,7 +260,7 @@ static void replace_func_new (void *vo, NCDModuleInst *i, const struct NCDModule
     while (in_pos < in_len) {
         // find first match
         int have_match = 0;
-        size_t match_regex;
+        size_t match_regex = 0; // to remove warning
         regmatch_t match = {0, 0}; // to remove warning
         for (size_t j = 0; j < num_regex; j++) {
             regmatch_t this_match;