You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@apr.apache.org by yl...@apache.org on 2023/03/20 18:24:44 UTC
svn commit: r1908585 - in /apr/apr-util/branches/1.6.x: ./ test/testbuckets.c
Author: ylavic
Date: Mon Mar 20 18:24:43 2023
New Revision: 1908585
URL: http://svn.apache.org/viewvc?rev=1908585&view=rev
Log:
* test/testbuckest.c (flatten_match): Fix error message (thanks to gcc warning).
* test/testbuckets.c (flatten_match): Avoid GCC 12 -Wformat-overflow
warnings with sprintf.
Merges r1859391, r1897646 from trunk.
Merges r1908582 from ^/apr/apr-util/branches/1.7.x.
Submitted by: jorton
Modified:
apr/apr-util/branches/1.6.x/ (props changed)
apr/apr-util/branches/1.6.x/test/testbuckets.c
Propchange: apr/apr-util/branches/1.6.x/
------------------------------------------------------------------------------
Merged /apr/apr/trunk:r1859391,1897646
Merged /apr/apr-util/branches/1.7.x:r1908582
Modified: apr/apr-util/branches/1.6.x/test/testbuckets.c
URL: http://svn.apache.org/viewvc/apr/apr-util/branches/1.6.x/test/testbuckets.c?rev=1908585&r1=1908584&r2=1908585&view=diff
==============================================================================
--- apr/apr-util/branches/1.6.x/test/testbuckets.c (original)
+++ apr/apr-util/branches/1.6.x/test/testbuckets.c Mon Mar 20 18:24:43 2023
@@ -100,12 +100,12 @@ static void flatten_match(abts_case *tc,
apr_size_t len = elen;
char msg[200];
- sprintf(msg, "%s: flatten brigade", ctx);
+ apr_snprintf(msg, sizeof msg, "%s: flatten brigade", ctx);
apr_assert_success(tc, msg, apr_brigade_flatten(bb, buf, &len));
- sprintf(msg, "%s: length match (%ld not %ld)", ctx,
- (long)len, (long)elen);
+ apr_snprintf(msg, sizeof msg, "%s: length match (%ld not %ld)", ctx,
+ (long)len, (long)elen);
ABTS_ASSERT(tc, msg, len == elen);
- sprintf(msg, "%s: result match", msg);
+ apr_snprintf(msg, sizeof msg, "%s: result match", ctx);
ABTS_STR_NEQUAL(tc, expect, buf, len);
free(buf);
}