|
|
b6c903 |
commit 23e15ea1ae80ec2120afdf643691359644cf2873
|
|
|
b6c903 |
Author: Siddhesh Poyarekar <siddhesh@sourceware.org>
|
|
|
b6c903 |
Date: Thu Jun 10 09:51:50 2021 +0530
|
|
|
b6c903 |
|
|
|
b6c903 |
gconv_conf: Remove unused variables
|
|
|
b6c903 |
|
|
|
b6c903 |
The modules and nmodules parameters passed to add_modules, add_alias,
|
|
|
b6c903 |
etc. are not used and are hence unnecessary. Remove them so that
|
|
|
b6c903 |
their signatures match the functions in iconvconfig.
|
|
|
b6c903 |
|
|
|
b6c903 |
Reviewed-by: DJ Delorie <dj@redhat.com>
|
|
|
b6c903 |
Reviewed-by: Andreas Schwab <schwab@linux-m68k.org>
|
|
|
b6c903 |
|
|
|
b6c903 |
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c
|
|
|
b6c903 |
index 3099bf192adce711..dc12ce24844474cc 100644
|
|
|
b6c903 |
--- a/iconv/gconv_conf.c
|
|
|
b6c903 |
+++ b/iconv/gconv_conf.c
|
|
|
b6c903 |
@@ -125,7 +125,7 @@ detect_conflict (const char *alias)
|
|
|
b6c903 |
|
|
|
b6c903 |
/* The actual code to add aliases. */
|
|
|
b6c903 |
static void
|
|
|
b6c903 |
-add_alias2 (const char *from, const char *to, const char *wp, void *modules)
|
|
|
b6c903 |
+add_alias2 (const char *from, const char *to, const char *wp)
|
|
|
b6c903 |
{
|
|
|
b6c903 |
/* Test whether this alias conflicts with any available module. */
|
|
|
b6c903 |
if (detect_conflict (from))
|
|
|
b6c903 |
@@ -154,7 +154,7 @@ add_alias2 (const char *from, const char *to, const char *wp, void *modules)
|
|
|
b6c903 |
|
|
|
b6c903 |
/* Add new alias. */
|
|
|
b6c903 |
static void
|
|
|
b6c903 |
-add_alias (char *rp, void *modules)
|
|
|
b6c903 |
+add_alias (char *rp)
|
|
|
b6c903 |
{
|
|
|
b6c903 |
/* We now expect two more string. The strings are normalized
|
|
|
b6c903 |
(converted to UPPER case) and strored in the alias database. */
|
|
|
b6c903 |
@@ -179,7 +179,7 @@ add_alias (char *rp, void *modules)
|
|
|
b6c903 |
return;
|
|
|
b6c903 |
*wp++ = '\0';
|
|
|
b6c903 |
|
|
|
b6c903 |
- add_alias2 (from, to, wp, modules);
|
|
|
b6c903 |
+ add_alias2 (from, to, wp);
|
|
|
b6c903 |
}
|
|
|
b6c903 |
|
|
|
b6c903 |
|
|
|
b6c903 |
@@ -243,8 +243,7 @@ insert_module (struct gconv_module *newp, int tobefreed)
|
|
|
b6c903 |
|
|
|
b6c903 |
/* Add new module. */
|
|
|
b6c903 |
static void
|
|
|
b6c903 |
-add_module (char *rp, const char *directory, size_t dir_len, void **modules,
|
|
|
b6c903 |
- size_t *nmodules, int modcounter)
|
|
|
b6c903 |
+add_module (char *rp, const char *directory, size_t dir_len, int modcounter)
|
|
|
b6c903 |
{
|
|
|
b6c903 |
/* We expect now
|
|
|
b6c903 |
1. `from' name
|
|
|
b6c903 |
@@ -357,8 +356,7 @@ add_module (char *rp, const char *directory, size_t dir_len, void **modules,
|
|
|
b6c903 |
|
|
|
b6c903 |
/* Read the next configuration file. */
|
|
|
b6c903 |
static void
|
|
|
b6c903 |
-read_conf_file (const char *filename, const char *directory, size_t dir_len,
|
|
|
b6c903 |
- void **modules, size_t *nmodules)
|
|
|
b6c903 |
+read_conf_file (const char *filename, const char *directory, size_t dir_len)
|
|
|
b6c903 |
{
|
|
|
b6c903 |
/* Note the file is opened with cancellation in the I/O functions
|
|
|
b6c903 |
disabled. */
|
|
|
b6c903 |
@@ -408,10 +406,10 @@ read_conf_file (const char *filename, const char *directory, size_t dir_len,
|
|
|
b6c903 |
|
|
|
b6c903 |
if (rp - word == sizeof ("alias") - 1
|
|
|
b6c903 |
&& memcmp (word, "alias", sizeof ("alias") - 1) == 0)
|
|
|
b6c903 |
- add_alias (rp, *modules);
|
|
|
b6c903 |
+ add_alias (rp);
|
|
|
b6c903 |
else if (rp - word == sizeof ("module") - 1
|
|
|
b6c903 |
&& memcmp (word, "module", sizeof ("module") - 1) == 0)
|
|
|
b6c903 |
- add_module (rp, directory, dir_len, modules, nmodules, modcounter++);
|
|
|
b6c903 |
+ add_module (rp, directory, dir_len, modcounter++);
|
|
|
b6c903 |
/* else */
|
|
|
b6c903 |
/* Otherwise ignore the line. */
|
|
|
b6c903 |
}
|
|
|
b6c903 |
@@ -537,8 +535,6 @@ void
|
|
|
b6c903 |
attribute_hidden
|
|
|
b6c903 |
__gconv_read_conf (void)
|
|
|
b6c903 |
{
|
|
|
b6c903 |
- void *modules = NULL;
|
|
|
b6c903 |
- size_t nmodules = 0;
|
|
|
b6c903 |
int save_errno = errno;
|
|
|
b6c903 |
size_t cnt;
|
|
|
b6c903 |
|
|
|
b6c903 |
@@ -570,7 +566,7 @@ __gconv_read_conf (void)
|
|
|
b6c903 |
gconv_conf_filename, sizeof (gconv_conf_filename));
|
|
|
b6c903 |
|
|
|
b6c903 |
/* Read the gconv-modules configuration file first. */
|
|
|
b6c903 |
- read_conf_file (buf, elem, elem_len, &modules, &nmodules);
|
|
|
b6c903 |
+ read_conf_file (buf, elem, elem_len);
|
|
|
b6c903 |
|
|
|
b6c903 |
/* Next, see if there is a gconv-modules.d directory containing
|
|
|
b6c903 |
configuration files and if it is non-empty. */
|
|
|
b6c903 |
@@ -597,7 +593,7 @@ __gconv_read_conf (void)
|
|
|
b6c903 |
char *conf;
|
|
|
b6c903 |
if (__asprintf (&conf, "%s/%s", buf, ent->d_name) < 0)
|
|
|
b6c903 |
continue;
|
|
|
b6c903 |
- read_conf_file (conf, elem, elem_len, &modules, &nmodules);
|
|
|
b6c903 |
+ read_conf_file (conf, elem, elem_len);
|
|
|
b6c903 |
free (conf);
|
|
|
b6c903 |
}
|
|
|
b6c903 |
}
|
|
|
b6c903 |
@@ -631,7 +627,7 @@ __gconv_read_conf (void)
|
|
|
b6c903 |
const char *to = __rawmemchr (from, '\0') + 1;
|
|
|
b6c903 |
cp = __rawmemchr (to, '\0') + 1;
|
|
|
b6c903 |
|
|
|
b6c903 |
- add_alias2 (from, to, cp, modules);
|
|
|
b6c903 |
+ add_alias2 (from, to, cp);
|
|
|
b6c903 |
}
|
|
|
b6c903 |
while (*cp != '\0');
|
|
|
b6c903 |
|