r300/compiler/tests: print regoff_t as size_t
authorAlex Xu (Hello71) <alex_y_xu@yahoo.ca>
Wed, 24 Nov 2021 23:01:29 +0000 (18:01 -0500)
committerMarge Bot <emma+marge@anholt.net>
Thu, 3 Mar 2022 17:48:17 +0000 (17:48 +0000)
fixes compilation on musl

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/13949>

src/gallium/drivers/r300/compiler/tests/rc_test_helpers.c

index 04c01f1..deb051f 100644 (file)
@@ -99,8 +99,9 @@ static int regex_helper(
        err_code = regexec(&regex, search_str, num_matches, matches, 0);
        DBG("Search string: '%s'\n", search_str);
        for (i = 0; i < num_matches; i++) {
-               DBG("Match %u start = %d end = %d\n", i,
-                                       matches[i].rm_so, matches[i].rm_eo);
+               DBG("Match %u start = %zu end = %zu\n", i,
+                                       (size_t)matches[i].rm_so,
+                                       (size_t)matches[i].rm_eo);
        }
        if (err_code) {
                regerror(err_code, &regex, err_buf, REGEX_ERR_BUF_SIZE);