From: Jeremy Harris Date: Sun, 12 Sep 2021 17:01:09 +0000 (+0100) Subject: Use %ld not %l X-Git-Tag: exim-4.96-RC0~162^2~4 X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/4a852e8c97fa4de42c443107121c7717e1f0c9b2 Use %ld not %l --- diff --git a/src/exim_monitor/em_init.c b/src/exim_monitor/em_init.c index f85f858d4..ee27c2052 100644 --- a/src/exim_monitor/em_init.c +++ b/src/exim_monitor/em_init.c @@ -78,7 +78,7 @@ for (i = 0; i <= 1; i++) { uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); - printf("regular expression error: %s at offset %l " + printf("regular expression error: %s at offset %ld " "while compiling %s\n", errbuf, (long)offset, buffer); exit(99); } diff --git a/src/src/exim.c b/src/src/exim.c index 27f1e9b88..ff1aa49db 100644 --- a/src/src/exim.c +++ b/src/src/exim.c @@ -1247,7 +1247,7 @@ show_db_version(fp); uschar buf[24]; pcre2_config(PCRE2_CONFIG_VERSION, buf); fprintf(fp, "Library version: PCRE2: Compile: %d.%d%s\n" - " Runtime: %s\n", + " Runtime: %s\n", PCRE2_MAJOR, PCRE2_MINOR, EXPAND_AND_QUOTE(PCRE2_PRERELEASE) "", buf); diff --git a/src/src/expand.c b/src/src/expand.c index 4e1ffbb24..2bd78aac6 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -5864,7 +5864,7 @@ while (*s) uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); expand_string_message = string_sprintf("regular expression error in " - "\"%s\": %s at offset %l", sub[1], errbuf, (long)roffset); + "\"%s\": %s at offset %ld", sub[1], errbuf, (long)roffset); goto EXPAND_FAILED; } md = pcre2_match_data_create(EXPAND_MAXN + 1, pcre_gen_ctx); diff --git a/src/src/filter.c b/src/src/filter.c index 7c9e963a4..dfcc80271 100644 --- a/src/src/filter.c +++ b/src/src/filter.c @@ -1605,7 +1605,7 @@ switch (c->type) uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); *error_pointer = string_sprintf("error while compiling " - "regular expression \"%s\": %s at offset %l", + "regular expression \"%s\": %s at offset %ld", exp[1], errbuf, (long)offset); return FALSE; } diff --git a/src/src/malware.c b/src/src/malware.c index cd80cd4b2..b34ca5794 100644 --- a/src/src/malware.c +++ b/src/src/malware.c @@ -313,7 +313,7 @@ if (!(cre = pcre2_compile((PCRE2_SPTR)re, PCRE2_ZERO_TERMINATED, { uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); - *errstr= string_sprintf("regular expression error in '%s': %s at offset %l", + *errstr= string_sprintf("regular expression error in '%s': %s at offset %ld", re, errbuf, (long)roffset); } return cre; diff --git a/src/src/regex.c b/src/src/regex.c index 35af5e1b5..2c14eb2d9 100644 --- a/src/src/regex.c +++ b/src/src/regex.c @@ -50,7 +50,7 @@ while ((regex_string = string_nextinlist(&list, &sep, NULL, 0))) uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); log_write(0, LOG_MAIN, - "regex acl condition warning - error in regex '%s': %s at offset %l, skipped.", + "regex acl condition warning - error in regex '%s': %s at offset %ld, skipped.", regex_string, errbuf, (long)pcre_erroffset); continue; } diff --git a/src/src/tls-gnu.c b/src/src/tls-gnu.c index 7d434f6af..618caf6a2 100644 --- a/src/src/tls-gnu.c +++ b/src/src/tls-gnu.c @@ -2112,7 +2112,7 @@ if (!state->lib_state.pri_string) if ((rc = creds_load_pristring(state, p, &errpos))) return tls_error_gnu(state, string_sprintf( "gnutls_priority_init(%s) failed at offset %ld, \"%.6s..\"", - p, errpos - CS p, errpos), + p, (long)(errpos - CS p), errpos), rc, errstr); } else @@ -4197,7 +4197,7 @@ DEBUG(D_tls) rc = gnutls_priority_init(&priority_cache, CS expciphers, &errpos); validate_check_rc(string_sprintf( "gnutls_priority_init(%s) failed at offset %ld, \"%.8s..\"", - expciphers, errpos - CS expciphers, errpos)); + expciphers, (long)(errpos - CS expciphers), errpos)); #undef return_deinit #undef validate_check_rc diff --git a/src/src/transports/appendfile.c b/src/src/transports/appendfile.c index bbd4a161f..5451416c9 100644 --- a/src/src/transports/appendfile.c +++ b/src/src/transports/appendfile.c @@ -2235,7 +2235,7 @@ else uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); addr->message = string_sprintf("appendfile: regular expression " - "error: %s at offset %l while compiling %s", errbuf, (long)offset, + "error: %s at offset %ld while compiling %s", errbuf, (long)offset, ob->quota_size_regex); return FALSE; } @@ -2324,7 +2324,7 @@ else uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); addr->message = string_sprintf("appendfile: regular expression " - "error: %s at offset %l while compiling %s", errbuf, (long)offset, + "error: %s at offset %ld while compiling %s", errbuf, (long)offset, ob->maildir_dir_regex); return FALSE; } diff --git a/src/src/transports/tf_maildir.c b/src/src/transports/tf_maildir.c index 2d7d01f11..2673b1443 100644 --- a/src/src/transports/tf_maildir.c +++ b/src/src/transports/tf_maildir.c @@ -154,7 +154,7 @@ if (maildirfolder_create_regex) uschar errbuf[128]; pcre2_get_error_message(err, errbuf, sizeof(errbuf)); addr->message = string_sprintf("appendfile: regular expression " - "error: %s at offset %l while compiling %s", errbuf, (long)offset, + "error: %s at offset %ld while compiling %s", errbuf, (long)offset, maildirfolder_create_regex); return FALSE; }