aboutsummaryrefslogtreecommitdiffstats
path: root/man3/regex.3
diff options
context:
space:
mode:
Diffstat (limited to 'man3/regex.3')
-rw-r--r--man3/regex.34
1 files changed, 2 insertions, 2 deletions
diff --git a/man3/regex.3 b/man3/regex.3
index e423e442d8..c86628e9a2 100644
--- a/man3/regex.3
+++ b/man3/regex.3
@@ -351,13 +351,13 @@ int main(void)
printf("String = \e"%s\e"\en", str);
printf("Matches:\en");
- for (int i = 0; ; i++) {
+ for (unsigned int i = 0; ; i++) {
if (regexec(&regex, s, ARRAY_SIZE(pmatch), pmatch, 0))
break;
off = pmatch[0].rm_so + (s \- str);
len = pmatch[0].rm_eo \- pmatch[0].rm_so;
- printf("#%d:\en", i);
+ printf("#%zu:\en", i);
printf("offset = %jd; length = %jd\en", (intmax_t) off,
(intmax_t) len);
printf("substring = \e"%.*s\e"\en", len, s + pmatch[0].rm_so);