summaryrefslogtreecommitdiff
path: root/extra/comp_err.c
diff options
context:
space:
mode:
authorEric Herman <eric@freesa.org>2021-09-03 06:38:54 +0200
committerVicențiu-Marian Ciorbaru <vicentiu@mariadb.org>2021-10-19 16:00:26 +0300
commit401ff6994d842a4072b7b155e5a958e178e6497a (patch)
tree2becd556b5bde6e7a890249462d0499927cf488d /extra/comp_err.c
parent9ab0d07e10fdec9b9db59b3ac493045c5be253b0 (diff)
downloadmariadb-git-401ff6994d842a4072b7b155e5a958e178e6497a.tar.gz
MDEV-26221: DYNAMIC_ARRAY use size_t for sizes
https://jira.mariadb.org/browse/MDEV-26221 my_sys DYNAMIC_ARRAY and DYNAMIC_STRING inconsistancy The DYNAMIC_STRING uses size_t for sizes, but DYNAMIC_ARRAY used uint. This patch adjusts DYNAMIC_ARRAY to use size_t like DYNAMIC_STRING. As the MY_DIR member number_of_files is copied from a DYNAMIC_ARRAY, this is changed to be size_t. As MY_TMPDIR members 'cur' and 'max' are copied from a DYNAMIC_ARRAY, these are also changed to be size_t. The lists of plugins and stored procedures use DYNAMIC_ARRAY, but their APIs assume a size of 'uint'; these are unchanged.
Diffstat (limited to 'extra/comp_err.c')
-rw-r--r--extra/comp_err.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/extra/comp_err.c b/extra/comp_err.c
index 7dc5cd1921a..2b84f1cbca7 100644
--- a/extra/comp_err.c
+++ b/extra/comp_err.c
@@ -440,7 +440,7 @@ static void clean_up(struct languages *lang_head, struct errors *error_head)
{
struct languages *tmp_lang, *next_language;
struct errors *tmp_error, *next_error;
- uint count, i;
+ size_t count, i;
if (default_language_changed)
my_free((void*) default_language);
@@ -724,7 +724,7 @@ static struct message *find_message(struct errors *err, const char *lang,
my_bool no_default)
{
struct message *tmp, *return_val= 0;
- uint i, count;
+ size_t i, count;
DBUG_ENTER("find_message");
count= (err->msg).elements;