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

View File

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

6
main.c
View File

@ -2774,9 +2774,9 @@ static void
decode_switches (int argc, const char **argv, int env) decode_switches (int argc, const char **argv, int env)
{ {
int bad = 0; int bad = 0;
register const struct command_switch *cs; const struct command_switch *cs;
register struct stringlist *sl; struct stringlist *sl;
register int c; int c;
/* getopt does most of the parsing for us. /* getopt does most of the parsing for us.
First, get its vectors set up. */ 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. */ the default goal file. */
for (d = suffix_file->deps; d != 0; d = d->next) 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))) if (*dep_name (d) != '.' && streq (name, dep_name (d)))
{ {
reject = 1; reject = 1;

View File

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

View File

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

View File

@ -107,7 +107,7 @@ static int
vmsHandleChildTerm (struct child *child) vmsHandleChildTerm (struct child *child)
{ {
int exit_code; int exit_code;
register struct child *lastc, *c; struct child *lastc, *c;
int child_failed; int child_failed;
/* The child efn is 0 when a built-in or null command is executed /* 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 void
build_vpath_lists (void) build_vpath_lists (void)
{ {
register struct vpath *new = 0; struct vpath *new = 0;
register struct vpath *old, *nexto; struct vpath *old, *nexto;
register char *p; char *p;
/* Reverse the chain. */ /* Reverse the chain. */
for (old = vpaths; old != 0; old = nexto) for (old = vpaths; old != 0; old = nexto)
@ -605,7 +605,7 @@ print_vpath_data_base (void)
nvpaths = 0; nvpaths = 0;
for (v = vpaths; v != 0; v = v->next) for (v = vpaths; v != 0; v = v->next)
{ {
register unsigned int i; unsigned int i;
++nvpaths; ++nvpaths;