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