about summary refs log tree commit diff
path: root/stdio-common
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2013-06-07 22:24:35 +0000
committerJoseph Myers <joseph@codesourcery.com>2013-06-07 22:24:35 +0000
commit2e09a79ada1f6d92809a037d41895e3d9302ad59 (patch)
tree999c9d18279a7de289937116273ae4016356aa3a /stdio-common
parent8e254d8e0d0820716e0ccf5f2b89c4fd1325f051 (diff)
downloadglibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.gz
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.tar.xz
glibc-2e09a79ada1f6d92809a037d41895e3d9302ad59.zip
Avoid use of "register" as optimization hint.
Diffstat (limited to 'stdio-common')
-rw-r--r--stdio-common/printf_fp.c4
-rw-r--r--stdio-common/printf_fphex.c4
-rw-r--r--stdio-common/printf_size.c4
-rw-r--r--stdio-common/test_rdwr.c2
-rw-r--r--stdio-common/tfformat.c2
-rw-r--r--stdio-common/vfprintf.c8
-rw-r--r--stdio-common/vfscanf.c14
-rw-r--r--stdio-common/xbug.c12
8 files changed, 25 insertions, 25 deletions
diff --git a/stdio-common/printf_fp.c b/stdio-common/printf_fp.c
index ad60f43eac..e20eab6a34 100644
--- a/stdio-common/printf_fp.c
+++ b/stdio-common/printf_fp.c
@@ -72,7 +72,7 @@
 #define outchar(ch)							      \
   do									      \
     {									      \
-      register const int outc = (ch);					      \
+      const int outc = (ch);						      \
       if (putc (outc, fp) == EOF)					      \
 	{								      \
 	  if (buffer_malloced)						      \
@@ -85,7 +85,7 @@
 #define PRINT(ptr, wptr, len)						      \
   do									      \
     {									      \
-      register size_t outlen = (len);					      \
+      size_t outlen = (len);						      \
       if (len > 20)							      \
 	{								      \
 	  if (PUT (fp, wide ? (const char *) wptr : ptr, outlen) != outlen)   \
diff --git a/stdio-common/printf_fphex.c b/stdio-common/printf_fphex.c
index fc3c9b232c..3da2eec40c 100644
--- a/stdio-common/printf_fphex.c
+++ b/stdio-common/printf_fphex.c
@@ -52,7 +52,7 @@
 #define outchar(ch)							      \
   do									      \
     {									      \
-      register const int outc = (ch);					      \
+      const int outc = (ch);						      \
       if (putc (outc, fp) == EOF)					      \
 	return -1;							      \
       ++done;								      \
@@ -61,7 +61,7 @@
 #define PRINT(ptr, wptr, len)						      \
   do									      \
     {									      \
-      register size_t outlen = (len);					      \
+      size_t outlen = (len);						      \
       if (wide)								      \
 	while (outlen-- > 0)						      \
 	  outchar (*wptr++);						      \
diff --git a/stdio-common/printf_size.c b/stdio-common/printf_size.c
index 68b08392ca..2c496e5b2f 100644
--- a/stdio-common/printf_size.c
+++ b/stdio-common/printf_size.c
@@ -42,7 +42,7 @@
 #define outchar(ch)							      \
   do									      \
     {									      \
-      register const int outc = (ch);					      \
+      const int outc = (ch);						      \
       if (putc (outc, fp) == EOF)					      \
 	return -1;							      \
       ++done;								      \
@@ -51,7 +51,7 @@
 #define PRINT(ptr, wptr, len)						      \
   do									      \
     {									      \
-      register size_t outlen = (len);					      \
+      size_t outlen = (len);						      \
       if (len > 20)							      \
 	{								      \
 	  if (PUT (fp, wide ? (const char *) wptr : ptr, outlen) != outlen)   \
diff --git a/stdio-common/test_rdwr.c b/stdio-common/test_rdwr.c
index 93b0fa438c..2be8365a39 100644
--- a/stdio-common/test_rdwr.c
+++ b/stdio-common/test_rdwr.c
@@ -78,7 +78,7 @@ main (int argc, char **argv)
     long int where = ftell (f);
     if (where == (long int) replace_from)
       {
-	register size_t i;
+	size_t i;
 	for (i = replace_from; i < replace_to; ++i)
 	  if (putc(replace[i], f) == EOF)
 	    {
diff --git a/stdio-common/tfformat.c b/stdio-common/tfformat.c
index 7704ddde39..5cb366dd48 100644
--- a/stdio-common/tfformat.c
+++ b/stdio-common/tfformat.c
@@ -4050,7 +4050,7 @@ sprint_double_type sprint_doubles[] =
 int required_precision = 13;
 
 static int
-matches (register char *result, register const char *desired)
+matches (char *result, const char *desired)
 {
     int digits_seen = 0;
     for (;; result++, desired++) {
diff --git a/stdio-common/vfprintf.c b/stdio-common/vfprintf.c
index c8bcf5a976..fb22f6969e 100644
--- a/stdio-common/vfprintf.c
+++ b/stdio-common/vfprintf.c
@@ -147,7 +147,7 @@
 #define	outchar(Ch)							      \
   do									      \
     {									      \
-      register const INT_T outc = (Ch);					      \
+      const INT_T outc = (Ch);						      \
       if (PUTC (outc, s) == EOF || done == INT_MAX)			      \
 	{								      \
 	  done = -1;							      \
@@ -2061,7 +2061,7 @@ printf_unknown (FILE *s, const struct printf_info *info,
   CHAR_T work_buffer[MAX (sizeof (info->width), sizeof (info->prec)) * 3];
   CHAR_T *const workend
     = &work_buffer[sizeof (work_buffer) / sizeof (CHAR_T)];
-  register CHAR_T *w;
+  CHAR_T *w;
 
   outchar (L_('%'));
 
@@ -2267,12 +2267,12 @@ static const struct _IO_jump_t _IO_helper_jumps =
 
 static int
 internal_function
-buffered_vfprintf (register _IO_FILE *s, const CHAR_T *format,
+buffered_vfprintf (_IO_FILE *s, const CHAR_T *format,
 		   _IO_va_list args)
 {
   CHAR_T buf[_IO_BUFSIZ];
   struct helper_file helper;
-  register _IO_FILE *hp = (_IO_FILE *) &helper._f;
+  _IO_FILE *hp = (_IO_FILE *) &helper._f;
   int result, to_flush;
 
   /* Orient the stream.  */
diff --git a/stdio-common/vfscanf.c b/stdio-common/vfscanf.c
index 82f7eee192..343056769e 100644
--- a/stdio-common/vfscanf.c
+++ b/stdio-common/vfscanf.c
@@ -206,13 +206,13 @@ _IO_vfscanf_internal (_IO_FILE *s, const char *format, _IO_va_list argptr,
 #endif
 {
   va_list arg;
-  register const CHAR_T *f = format;
-  register UCHAR_T fc;	/* Current character of the format.  */
-  register WINT_T done = 0;	/* Assignments done.  */
-  register size_t read_in = 0;	/* Chars read in.  */
-  register WINT_T c = 0;	/* Last char read.  */
-  register int width;		/* Maximum field width.  */
-  register int flags;		/* Modifiers for current format element.  */
+  const CHAR_T *f = format;
+  UCHAR_T fc;	/* Current character of the format.  */
+  WINT_T done = 0;	/* Assignments done.  */
+  size_t read_in = 0;	/* Chars read in.  */
+  WINT_T c = 0;	/* Last char read.  */
+  int width;		/* Maximum field width.  */
+  int flags;		/* Modifiers for current format element.  */
   int errval = 0;
 #ifndef COMPILE_WSCANF
   __locale_t loc = _NL_CURRENT_LOCALE;
diff --git a/stdio-common/xbug.c b/stdio-common/xbug.c
index 76a8c54726..64ba314cbe 100644
--- a/stdio-common/xbug.c
+++ b/stdio-common/xbug.c
@@ -9,8 +9,8 @@ typedef struct _Buffer {
 } Buffer;
 
 void InitBuffer (Buffer *b);
-void AppendToBuffer (register Buffer *b, const char *str, register int len);
-void ReadFile (register Buffer *buffer, FILE *input);
+void AppendToBuffer (Buffer *b, const char *str, int len);
+void ReadFile (Buffer *buffer, FILE *input);
 
 #define INIT_BUFFER_SIZE 10000
 
@@ -23,9 +23,9 @@ void InitBuffer(b)
 }
 
 void AppendToBuffer(b, str, len)
-     register Buffer *b;
+     Buffer *b;
      const char *str;
-     register int len;
+     int len;
 {
   while (b->used + len > b->room) {
     b->buff = (char *)realloc(b->buff, 2*b->room*(sizeof(char)));
@@ -36,11 +36,11 @@ void AppendToBuffer(b, str, len)
 }
 
 void ReadFile(buffer, input)
-     register Buffer *buffer;
+     Buffer *buffer;
      FILE *input;
 {
   char       buf[BUFSIZ + 1];
-  register int        bytes;
+  int        bytes;
 
   buffer->used = 0;
   while (!feof(input) && (bytes = fread(buf, 1, BUFSIZ, input)) > 0) {