Rename basename' as base_name', to avoid a gcc compiler warning

Estimated hours taken: 0.1
Branches: main, release

util/mkinit.c:
	Rename `basename' as `base_name', to avoid a gcc compiler warning
	with `-Wshadow'.
This commit is contained in:
Fergus Henderson
2001-05-08 05:55:48 +00:00
parent 51c445f1cc
commit a044202f86

View File

@@ -261,7 +261,7 @@ static const char if_need_to_init[] =
static void parse_options(int argc, char *argv[]);
static void usage(void);
static void do_path_search(void);
static char *find_init_file(const char *basename);
static char *find_init_file(const char *base_name);
static bool file_exists(const char *filename);
static void output_headers(void);
static int output_sub_init_functions(const char *suffix,
@@ -460,7 +460,7 @@ do_path_search(void)
** holding the full path name when it is no longer needed.
*/
static char *
find_init_file(const char *basename)
find_init_file(const char *base_name)
{
char *filename;
char *dirname;
@@ -469,12 +469,12 @@ find_init_file(const char *basename)
int baselen;
int len;
if (file_exists(basename)) {
if (file_exists(base_name)) {
/* File is in current directory, so no search required */
return NULL;
}
baselen = strlen(basename);
baselen = strlen(base_name);
for (dir_ptr = init_file_dirs; dir_ptr != NULL;
dir_ptr = dir_ptr->next)
@@ -486,7 +486,7 @@ find_init_file(const char *basename)
filename = (char *) checked_malloc(len + 1);
strcpy(filename, dirname);
filename[dirlen] = '/';
strcpy(filename + dirlen + 1, basename);
strcpy(filename + dirlen + 1, base_name);
if (file_exists(filename))
return filename;