Remove uses of unnecessary "register" keyword.

This commit is contained in:
Paul Smith 2017-07-09 21:24:41 -04:00
parent 22fd578693
commit ac97214635
9 changed files with 33 additions and 33 deletions

View File

@ -479,7 +479,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
/* Now find the members one by one. */
{
#ifdef SARMAG
register long int member_offset = SARMAG;
long int member_offset = SARMAG;
#else
#ifdef AIAMAG
long int member_offset;
@ -506,16 +506,16 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
}
#else
#ifndef M_XENIX
register long int member_offset = sizeof (int);
long int member_offset = sizeof (int);
#else /* Xenix. */
register long int member_offset = sizeof (unsigned short int);
long int member_offset = sizeof (unsigned short int);
#endif /* Not Xenix. */
#endif
#endif
while (1)
{
register int nread;
int nread;
struct ar_hdr member_header;
#ifdef AIAMAGBIG
struct ar_hdr_big member_header_big;
@ -638,7 +638,7 @@ ar_scan (const char *archive, ar_member_func_t function, const void *arg)
name = namebuf;
memcpy (name, member_header.ar_name, sizeof member_header.ar_name);
{
register char *p = name + sizeof member_header.ar_name;
char *p = name + sizeof member_header.ar_name;
do
*p = '\0';
while (p > name && *--p == ' ');

View File

@ -55,7 +55,7 @@ char *variable_buffer;
char *
variable_buffer_output (char *ptr, const char *string, unsigned int length)
{
register unsigned int newlen = length + (ptr - variable_buffer);
unsigned int newlen = length + (ptr - variable_buffer);
if ((newlen + VARIABLE_BUFFER_ZONE) > variable_buffer_length)
{

18
job.c
View File

@ -830,12 +830,12 @@ reap_children (int block, int err)
/* get exit data */
exit_code = process_exit_code (hPID);
/* the extra tests of exit_code are here to prevent
map_windows32_error_to_string from calling 'fatal',
which will then call reap_children again */
/* the extra tests of exit_code are here to prevent
map_windows32_error_to_string from calling 'fatal',
which will then call reap_children again */
if (werr && exit_code > 0 && exit_code < WSABASEERR)
fprintf (stderr, "make (e=%d): %s", exit_code,
map_windows32_error_to_string (exit_code));
fprintf (stderr, "make (e=%d): %s", exit_code,
map_windows32_error_to_string (exit_code));
/* signal */
exit_sig = process_signal (hPID);
@ -1076,7 +1076,7 @@ free_child (struct child *child)
if (child->command_lines != 0)
{
register unsigned int i;
unsigned int i;
for (i = 0; i < child->file->cmds->ncommand_lines; ++i)
free (child->command_lines[i]);
free (child->command_lines);
@ -1084,7 +1084,7 @@ free_child (struct child *child)
if (child->environment != 0)
{
register char **ep = child->environment;
char **ep = child->environment;
while (*ep != 0)
free (*ep++);
free (child->environment);
@ -2848,7 +2848,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
If so, have the shell handle it. */
if (i == 1)
{
register int j;
int j;
for (j = 0; sh_cmds[j] != 0; ++j)
{
if (streq (sh_cmds[j], new_argv[0]))
@ -2887,7 +2887,7 @@ construct_command_argv_internal (char *line, char **restp, const char *shell,
if (i == 1)
{
register int j;
int j;
for (j = 0; sh_cmds[j] != 0; ++j)
if (streq (sh_cmds[j], new_argv[0]))
goto slow;

6
main.c
View File

@ -2774,9 +2774,9 @@ static void
decode_switches (int argc, const char **argv, int env)
{
int bad = 0;
register const struct command_switch *cs;
register struct stringlist *sl;
register int c;
const struct command_switch *cs;
struct stringlist *sl;
int c;
/* getopt does most of the parsing for us.
First, get its vectors set up. */

2
read.c
View File

@ -1338,7 +1338,7 @@ eval (struct ebuffer *ebuf, int set_default)
the default goal file. */
for (d = suffix_file->deps; d != 0; d = d->next)
{
register struct dep *d2;
struct dep *d2;
if (*dep_name (d) != '.' && streq (name, dep_name (d)))
{
reject = 1;

View File

@ -101,7 +101,7 @@ update_goal_chain (struct goaldep *goaldeps)
while (goals != 0)
{
register struct dep *g, *lastgoal;
struct dep *g, *lastgoal;
/* Start jobs that are waiting for the load to go down. */
@ -583,7 +583,7 @@ update_file_1 (struct file *file, unsigned int depth)
check_renamed (d->file);
{
register struct file *f = d->file;
struct file *f = d->file;
if (f->double_colon)
f = f->double_colon;
do
@ -647,7 +647,7 @@ update_file_1 (struct file *file, unsigned int depth)
check_renamed (d->file);
{
register struct file *f = d->file;
struct file *f = d->file;
if (f->double_colon)
f = f->double_colon;
do

View File

@ -50,8 +50,8 @@ static struct pattern_var *last_pattern_vars[256];
struct pattern_var *
create_pattern_var (const char *target, const char *suffix)
{
register unsigned int len = strlen (target);
register struct pattern_var *p = xcalloc (sizeof (struct pattern_var));
unsigned int len = strlen (target);
struct pattern_var *p = xcalloc (sizeof (struct pattern_var));
if (pattern_vars != 0)
{
@ -63,7 +63,7 @@ create_pattern_var (const char *target, const char *suffix)
else
{
/* Find the position where we can insert this variable. */
register struct pattern_var **v;
struct pattern_var **v;
for (v = &pattern_vars; ; v = &(*v)->next)
{
@ -673,8 +673,8 @@ initialize_file_variables (struct file *file, int reading)
struct variable_set_list *
create_new_variable_set (void)
{
register struct variable_set_list *setlist;
register struct variable_set *set;
struct variable_set_list *setlist;
struct variable_set *set;
set = xmalloc (sizeof (struct variable_set));
hash_init (&set->table, SMALL_SCOPE_VARIABLE_BUCKETS,
@ -981,7 +981,7 @@ char **
target_environment (struct file *file)
{
struct variable_set_list *set_list;
register struct variable_set_list *s;
struct variable_set_list *s;
struct hash_table table;
struct variable **v_slot;
struct variable **v_end;

View File

@ -107,7 +107,7 @@ static int
vmsHandleChildTerm (struct child *child)
{
int exit_code;
register struct child *lastc, *c;
struct child *lastc, *c;
int child_failed;
/* The child efn is 0 when a built-in or null command is executed

View File

@ -54,9 +54,9 @@ static struct vpath *gpaths;
void
build_vpath_lists (void)
{
register struct vpath *new = 0;
register struct vpath *old, *nexto;
register char *p;
struct vpath *new = 0;
struct vpath *old, *nexto;
char *p;
/* Reverse the chain. */
for (old = vpaths; old != 0; old = nexto)
@ -605,7 +605,7 @@ print_vpath_data_base (void)
nvpaths = 0;
for (v = vpaths; v != 0; v = v->next)
{
register unsigned int i;
unsigned int i;
++nvpaths;