From 2e09a79ada1f6d92809a037d41895e3d9302ad59 Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Fri, 7 Jun 2013 22:24:35 +0000 Subject: Avoid use of "register" as optimization hint. --- posix/fnmatch_loop.c | 6 +++--- posix/getconf.c | 4 ++-- posix/getopt.c | 4 ++-- posix/glob.c | 6 +++--- 4 files changed, 10 insertions(+), 10 deletions(-) (limited to 'posix') diff --git a/posix/fnmatch_loop.c b/posix/fnmatch_loop.c index 6c4301df13..078b98242e 100644 --- a/posix/fnmatch_loop.c +++ b/posix/fnmatch_loop.c @@ -47,8 +47,8 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) struct STRUCT *ends; size_t alloca_used; { - register const CHAR *p = pattern, *n = string; - register UCHAR c; + const CHAR *p = pattern, *n = string; + UCHAR c; #ifdef _LIBC # if WIDE_CHAR_VERSION const char *collseq = (const char *) @@ -237,7 +237,7 @@ FCT (pattern, string, string_end, no_leading_period, flags, ends, alloca_used) /* Nonzero if the sense of the character class is inverted. */ const CHAR *p_init = p; const CHAR *n_init = n; - register int not; + int not; CHAR cold; UCHAR fn; diff --git a/posix/getconf.c b/posix/getconf.c index 8a0c79bf34..878772022d 100644 --- a/posix/getconf.c +++ b/posix/getconf.c @@ -1043,7 +1043,7 @@ usage (void) static void print_all (const char *path) { - register const struct conf *c; + const struct conf *c; size_t clen; long int value; char *cvalue; @@ -1087,7 +1087,7 @@ print_all (const char *path) int main (int argc, char *argv[]) { - register const struct conf *c; + const struct conf *c; /* Set locale. Do not set LC_ALL because the other categories must not be affected (according to POSIX.2). */ diff --git a/posix/getopt.c b/posix/getopt.c index 20b8eb30bf..5497fc4247 100644 --- a/posix/getopt.c +++ b/posix/getopt.c @@ -227,7 +227,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Bottom segment is the short one. */ int len = middle - bottom; - register int i; + int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) @@ -244,7 +244,7 @@ exchange (char **argv, struct _getopt_data *d) { /* Top segment is the short one. */ int len = top - middle; - register int i; + int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) diff --git a/posix/glob.c b/posix/glob.c index 83b4f2fed3..4c7dce5ee8 100644 --- a/posix/glob.c +++ b/posix/glob.c @@ -1263,7 +1263,7 @@ libc_hidden_def (glob) /* Free storage allocated in PGLOB by a previous `glob' call. */ void globfree (pglob) - register glob_t *pglob; + glob_t *pglob; { if (pglob->gl_pathv != NULL) { @@ -1303,7 +1303,7 @@ collated_compare (const void *a, const void *b) static int prefix_array (const char *dirname, char **array, size_t n) { - register size_t i; + size_t i; size_t dirlen = strlen (dirname); #if defined __MSDOS__ || defined WINDOWS32 int sep_char = '/'; @@ -1362,7 +1362,7 @@ __glob_pattern_type (pattern, quote) const char *pattern; int quote; { - register const char *p; + const char *p; int ret = 0; for (p = pattern; *p != '\0'; ++p) -- cgit v1.2.3