]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Remove uses of unnecessary "register" keyword.
authorPaul Smith <psmith@gnu.org>
Mon, 10 Jul 2017 01:24:41 +0000 (21:24 -0400)
committerPaul Smith <psmith@gnu.org>
Mon, 10 Jul 2017 01:24:41 +0000 (21:24 -0400)
arscan.c
expand.c
job.c
main.c
read.c
remake.c
variable.c
vmsjobs.c
vpath.c

index ba8987e6a3778d229e976fc7cce3aaa951e6a718..3db252a1c32e2eef03b707632c107d6e8dd69488 100644 (file)
--- a/arscan.c
+++ b/arscan.c
@@ -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 == ' ');
index 60c60718f13efaf3ce79cf2546b47c4686d17141..20c526f14ae7d2f6735236e297e8fe3294ddb6ec 100644 (file)
--- a/expand.c
+++ b/expand.c
@@ -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)
     {
diff --git a/job.c b/job.c
index c35213a73cd3b29dd3207e515726ba98f5a895d4..98e792586eb5e37b97f649b9db585412acd04124 100644 (file)
--- a/job.c
+++ b/job.c
@@ -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;
diff --git a/main.c b/main.c
index 4079da229abe385cc2ce5f76d877613f2fdab3aa..b2c4ac79d463bee20c9f96a76b72f44cb319929d 100644 (file)
--- a/main.c
+++ b/main.c
@@ -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.  */
diff --git a/read.c b/read.c
index d30727b36a578182e05a5c8bad663eb64845cde9..29adcd490e9b45fcc7f65330ba53ecea1d97c4aa 100644 (file)
--- a/read.c
+++ b/read.c
@@ -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;
index c01eb910f64fd72210c5a37bd6176342c991024a..bac5c2bfbce430fe179b56d8554a39a333f926e9 100644 (file)
--- a/remake.c
+++ b/remake.c
@@ -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
index e9bf5b597415cd2c720486b0af89dd3320396a3a..14d527fefc3d978cb631a5c65c3d5c6bafbb6170 100644 (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;
index 77a142ebf4951843ead0fd124693fb06cd25ee1a..b6c01cf715f7d6da10f1a45b2c03f497ca439781 100644 (file)
--- a/vmsjobs.c
+++ b/vmsjobs.c
@@ -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
diff --git a/vpath.c b/vpath.c
index 0c7dce3576825cee46ff17e7b5043eae2d7c166c..7ad83c93a26ff4123d05bf124fe7faedd14a6875 100644 (file)
--- a/vpath.c
+++ b/vpath.c
@@ -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;