maint: remove unused parameters

* sed/compile.c (finish_program): This function's sole argument
was unused. Remove it and update callers.
* sed/sed.h: Update prototype.
* sed/utils.c (register_open_file): This functions's third argument,
"temp", was unused.  Remove it and update callers.
* sed/sed.c: Update use.
This commit is contained in:
Jim Meyering committed 2016-11-27 09:15:52 -08:00
1 parent fbe256efa2
commit 7869c66841
4 files changed
+7 -7

No files matched your search

+1 -1
View File
@@ -1679,7 +1679,7 @@ rewind_read_files(void)
/* Release all resources which were allocated in this module. */
void
finish_program(struct vector *program)
finish_program(void)
{
/* close all files... */
{
+1 -1
View File
@@ -376,7 +376,7 @@ main (int argc, char **argv)
return_code = process_files(the_program, argv+optind);
finish_program(the_program);
finish_program();
ck_fclose(NULL);
return return_code;
+1 -1
View File
@@ -191,7 +191,7 @@ struct vector *compile_string (struct vector *, char *str, size_t len);
struct vector *compile_file (struct vector *, const char *cmdfile);
void check_final_program (struct vector *);
void rewind_read_files (void);
void finish_program (struct vector *);
void finish_program (void);
struct regex *compile_regex (struct buffer *b, int flags, int needed_sub);
int match_regex (struct regex *regex,
+4 -4
View File
@@ -101,7 +101,7 @@ utils_fp_name(FILE *fp)
}
static void
register_open_file (FILE *fp, const char *name, int temp)
register_open_file (FILE *fp, const char *name)
{
struct open_file *p;
for (p=open_files; p; p=p->link)
@@ -138,7 +138,7 @@ ck_fopen(const char *name, const char *mode, int fail)
return NULL;
}
register_open_file (fp, name, false);
register_open_file (fp, name);
return fp;
}
@@ -157,7 +157,7 @@ ck_fdopen( int fd, const char *name, const char *mode, int fail)
return NULL;
}
register_open_file (fp, name, false);
register_open_file (fp, name);
return fp;
}
@@ -179,7 +179,7 @@ ck_mkstemp (char **p_filename, const char *tmpdir,
*p_filename = template;
FILE *fp = fdopen (fd, mode);
register_open_file (fp, template, true);
register_open_file (fp, template);
return fp;
}