summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2013-07-01 13:24:22 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2013-07-01 13:24:22 (GMT)
commit526f1e636ef206f91d04f070f1598cc1c9746e6f (patch)
tree7650227ed718c524e781355b009b4092ed57190f /Source
parent5f36fa98ffd0258cbcd987c11127db1ffdf5404c (diff)
parente1381b1fc6da4d6500e1cae2e68fcc0be8d4a2ac (diff)
downloadCMake-526f1e636ef206f91d04f070f1598cc1c9746e6f.zip
CMake-526f1e636ef206f91d04f070f1598cc1c9746e6f.tar.gz
CMake-526f1e636ef206f91d04f070f1598cc1c9746e6f.tar.bz2
Merge topic 'clang-register-warnings'
e1381b1 Document removal of 'register' from flex/bison output 1399825 Remove some uses of obsolete 'register' storage specifier
Diffstat (limited to 'Source')
-rw-r--r--Source/CTest/cmCTestSubmitHandler.cxx2
-rw-r--r--Source/CursesDialog/form/fty_regex.c2
-rw-r--r--Source/cmCTest.cxx2
-rw-r--r--Source/cmCommandArgumentLexer.cxx30
-rw-r--r--Source/cmCommandArgumentLexer.in.l1
-rw-r--r--Source/cmCommandArgumentParser.y1
-rw-r--r--Source/cmDependsFortranLexer.cxx40
-rw-r--r--Source/cmDependsFortranLexer.in.l1
-rw-r--r--Source/cmDependsFortranParser.y1
-rw-r--r--Source/cmDependsJavaLexer.cxx30
-rw-r--r--Source/cmDependsJavaLexer.in.l1
-rw-r--r--Source/cmDependsJavaParser.cxx16
-rw-r--r--Source/cmDependsJavaParser.y1
-rw-r--r--Source/cmExprLexer.cxx30
-rw-r--r--Source/cmExprLexer.in.l1
-rw-r--r--Source/cmExprParser.cxx16
-rw-r--r--Source/cmExprParser.y1
-rw-r--r--Source/cmFileCommand.cxx4
-rw-r--r--Source/cmListFileLexer.c30
-rw-r--r--Source/cmListFileLexer.in.l1
20 files changed, 110 insertions, 101 deletions
diff --git a/Source/CTest/cmCTestSubmitHandler.cxx b/Source/CTest/cmCTestSubmitHandler.cxx
index 142bb46..941d348 100644
--- a/Source/CTest/cmCTestSubmitHandler.cxx
+++ b/Source/CTest/cmCTestSubmitHandler.cxx
@@ -120,7 +120,7 @@ static size_t
cmCTestSubmitHandlerWriteMemoryCallback(void *ptr, size_t size, size_t nmemb,
void *data)
{
- register int realsize = (int)(size * nmemb);
+ int realsize = (int)(size * nmemb);
cmCTestSubmitHandlerVectorOfChar *vec
= static_cast<cmCTestSubmitHandlerVectorOfChar*>(data);
diff --git a/Source/CursesDialog/form/fty_regex.c b/Source/CursesDialog/form/fty_regex.c
index 0af1cef..f90e0c1 100644
--- a/Source/CursesDialog/form/fty_regex.c
+++ b/Source/CursesDialog/form/fty_regex.c
@@ -40,7 +40,7 @@ static char *RegEx_Error(int code)
return 0;
}
-#define INIT register char *sp = RegEx_Init(instring);
+#define INIT char *sp = RegEx_Init(instring);
#define GETC() (*sp++)
#define PEEKC() (*sp)
#define UNGETC(c) (--sp)
diff --git a/Source/cmCTest.cxx b/Source/cmCTest.cxx
index 69ffb97..14e1f50 100644
--- a/Source/cmCTest.cxx
+++ b/Source/cmCTest.cxx
@@ -175,7 +175,7 @@ std::string cmCTest::GetCostDataFile()
static size_t
HTTPResponseCallback(void *ptr, size_t size, size_t nmemb, void *data)
{
- register int realsize = (int)(size * nmemb);
+ int realsize = (int)(size * nmemb);
std::string *response
= static_cast<std::string*>(data);
diff --git a/Source/cmCommandArgumentLexer.cxx b/Source/cmCommandArgumentLexer.cxx
index 1d7140b..e68f6b5 100644
--- a/Source/cmCommandArgumentLexer.cxx
+++ b/Source/cmCommandArgumentLexer.cxx
@@ -730,9 +730,9 @@ extern int cmCommandArgument_yylex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 64 "cmCommandArgumentLexer.in.l"
@@ -782,7 +782,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1082,9 +1082,9 @@ return 0; /* this should not happend but it should silence a warning */
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1216,15 +1216,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1249,11 +1249,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -2015,7 +2015,7 @@ int cmCommandArgument_yylex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2024,7 +2024,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
diff --git a/Source/cmCommandArgumentLexer.in.l b/Source/cmCommandArgumentLexer.in.l
index fdca61b..24a0eec 100644
--- a/Source/cmCommandArgumentLexer.in.l
+++ b/Source/cmCommandArgumentLexer.in.l
@@ -22,6 +22,7 @@ Modify cmCommandArgumentLexer.cxx:
- add #include "cmStandardIncludes.h" to top of file
- put header block at top of file
- remove TABs
+ - remove use of the 'register' storage class specifier
- remove "yyscanner" argument from these methods:
yy_fatal_error, cmCommandArgument_yyalloc, cmCommandArgument_yyrealloc, cmCommandArgument_yyfree
- remove all YY_BREAK lines occurring right after return statements
diff --git a/Source/cmCommandArgumentParser.y b/Source/cmCommandArgumentParser.y
index 3e700c8..48f5c8e 100644
--- a/Source/cmCommandArgumentParser.y
+++ b/Source/cmCommandArgumentParser.y
@@ -20,6 +20,7 @@ Run bison like this:
Modify cmCommandArgumentParser.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- put header block at top of file
*/
diff --git a/Source/cmDependsFortranLexer.cxx b/Source/cmDependsFortranLexer.cxx
index b0d9a74..924d9d2 100644
--- a/Source/cmDependsFortranLexer.cxx
+++ b/Source/cmDependsFortranLexer.cxx
@@ -913,9 +913,9 @@ extern int cmDependsFortran_yylex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 71 "cmDependsFortranLexer.in.l"
@@ -966,7 +966,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1386,9 +1386,9 @@ ECHO;
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1520,8 +1520,8 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
@@ -1529,7 +1529,7 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1554,11 +1554,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner; /* This var may be unused depending upon options. */
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1576,9 +1576,9 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
return yy_is_jam ? 0 : yy_current_state;
}
- static void yyunput (int c, register char * yy_bp , yyscan_t yyscanner)
+ static void yyunput (int c, char * yy_bp , yyscan_t yyscanner)
{
- register char *yy_cp;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_cp = yyg->yy_c_buf_p;
@@ -1589,10 +1589,10 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 )
{ /* need to shift things up to make room */
/* +2 for EOB chars. */
- register int number_to_move = yyg->yy_n_chars + 2;
- register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
+ int number_to_move = yyg->yy_n_chars + 2;
+ char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[
YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2];
- register char *source =
+ char *source =
&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move];
while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf )
@@ -2359,7 +2359,7 @@ int cmDependsFortran_yylex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ int i;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
}
@@ -2368,7 +2368,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
for ( n = 0; s[n]; ++n )
;
diff --git a/Source/cmDependsFortranLexer.in.l b/Source/cmDependsFortranLexer.in.l
index 40e80b7..0148802 100644
--- a/Source/cmDependsFortranLexer.in.l
+++ b/Source/cmDependsFortranLexer.in.l
@@ -30,6 +30,7 @@ Run flex like this:
Modify cmDependsFortranLexer.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- remove "yyscanner" argument from these methods:
yy_fatal_error, cmDependsFortran_yyalloc, cmDependsFortran_yyrealloc, cmDependsFortran_yyfree
- remove "yyscanner = NULL" from end of cmDependsFortran_yylex_destroy
diff --git a/Source/cmDependsFortranParser.y b/Source/cmDependsFortranParser.y
index 5681d69..d814f30 100644
--- a/Source/cmDependsFortranParser.y
+++ b/Source/cmDependsFortranParser.y
@@ -33,6 +33,7 @@ Run bison like this:
Modify cmDependsFortranParser.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- Remove the yyerrorlab block in range ["goto yyerrlab1", "yyerrlab1:"]
*/
diff --git a/Source/cmDependsJavaLexer.cxx b/Source/cmDependsJavaLexer.cxx
index 63cfebc..0af44b0 100644
--- a/Source/cmDependsJavaLexer.cxx
+++ b/Source/cmDependsJavaLexer.cxx
@@ -904,9 +904,9 @@ extern int cmDependsJava_yylex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 88 "cmDependsJavaLexer.in.l"
@@ -955,7 +955,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1604,9 +1604,9 @@ return 0; /* this should not happen but it silences a warning*/
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1730,15 +1730,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1763,11 +1763,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -2481,7 +2481,7 @@ int cmDependsJava_yylex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ int i;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -2491,7 +2491,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( n = 0; s[n]; ++n )
;
diff --git a/Source/cmDependsJavaLexer.in.l b/Source/cmDependsJavaLexer.in.l
index 9796ad5..aa2f8a5 100644
--- a/Source/cmDependsJavaLexer.in.l
+++ b/Source/cmDependsJavaLexer.in.l
@@ -20,6 +20,7 @@ Run flex like this:
Modify cmDependsJavaLexer.c:
- remove TABs
+ - remove use of the 'register' storage class specifier
- remove "yyscanner" argument from these methods:
yy_fatal_error, cmDependsJava_yyalloc, cmDependsJava_yyrealloc, cmDependsJava_yyfree
- remove all YY_BREAK lines occurring right after return statements
diff --git a/Source/cmDependsJavaParser.cxx b/Source/cmDependsJavaParser.cxx
index 7f7c385..586c0de 100644
--- a/Source/cmDependsJavaParser.cxx
+++ b/Source/cmDependsJavaParser.cxx
@@ -446,7 +446,7 @@ union yyalloc
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -1821,7 +1821,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -1846,8 +1846,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -1977,8 +1977,8 @@ YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@@ -1996,12 +1996,12 @@ int yynerrs;
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
- register short int *yyssp;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
diff --git a/Source/cmDependsJavaParser.y b/Source/cmDependsJavaParser.y
index 53210b8..944d4b5 100644
--- a/Source/cmDependsJavaParser.y
+++ b/Source/cmDependsJavaParser.y
@@ -20,6 +20,7 @@ Run bison like this:
Modify cmDependsJavaParser.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- add __HP_aCC to the #if test for yyerrorlab warning suppression
*/
diff --git a/Source/cmExprLexer.cxx b/Source/cmExprLexer.cxx
index 53dfca7..9947c77 100644
--- a/Source/cmExprLexer.cxx
+++ b/Source/cmExprLexer.cxx
@@ -693,9 +693,9 @@ extern int cmExpr_yylex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 86 "/home/andy/vtk/CMake/Source/cmExprLexer.in.l"
@@ -745,7 +745,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -989,9 +989,9 @@ return 0; /* this should not happen but it silences a warning*/
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1116,15 +1116,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1149,11 +1149,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1867,7 +1867,7 @@ int cmExpr_yylex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ int i;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -1877,7 +1877,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( n = 0; s[n]; ++n )
;
diff --git a/Source/cmExprLexer.in.l b/Source/cmExprLexer.in.l
index f344b40..febd244 100644
--- a/Source/cmExprLexer.in.l
+++ b/Source/cmExprLexer.in.l
@@ -20,6 +20,7 @@ Run flex like this:
Modify cmExprLexer.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- remove "yyscanner" argument from these methods:
yy_fatal_error, cmExpr_yyalloc, cmExpr_yyrealloc, cmExpr_yyfree
- remove all YY_BREAK lines occurring right after return statements
diff --git a/Source/cmExprParser.cxx b/Source/cmExprParser.cxx
index 5c164a0..77880c0 100644
--- a/Source/cmExprParser.cxx
+++ b/Source/cmExprParser.cxx
@@ -267,7 +267,7 @@ union yyalloc
# define YYCOPY(To, From, Count) \
do \
{ \
- register YYSIZE_T yyi; \
+ YYSIZE_T yyi; \
for (yyi = 0; yyi < (Count); yyi++) \
(To)[yyi] = (From)[yyi]; \
} \
@@ -696,7 +696,7 @@ yystrlen (yystr)
const char *yystr;
# endif
{
- register const char *yys = yystr;
+ const char *yys = yystr;
while (*yys++ != '\0')
continue;
@@ -721,8 +721,8 @@ yystpcpy (yydest, yysrc)
const char *yysrc;
# endif
{
- register char *yyd = yydest;
- register const char *yys = yysrc;
+ char *yyd = yydest;
+ const char *yys = yysrc;
while ((*yyd++ = *yys++) != '\0')
continue;
@@ -852,8 +852,8 @@ YYSTYPE yylval;
/* Number of syntax errors so far. */
int yynerrs;
- register int yystate;
- register int yyn;
+ int yystate;
+ int yyn;
int yyresult;
/* Number of tokens to shift before error messages enabled. */
int yyerrstatus;
@@ -871,12 +871,12 @@ int yynerrs;
/* The state stack. */
short int yyssa[YYINITDEPTH];
short int *yyss = yyssa;
- register short int *yyssp;
+ short int *yyssp;
/* The semantic value stack. */
YYSTYPE yyvsa[YYINITDEPTH];
YYSTYPE *yyvs = yyvsa;
- register YYSTYPE *yyvsp;
+ YYSTYPE *yyvsp;
diff --git a/Source/cmExprParser.y b/Source/cmExprParser.y
index 317b0ba..12c2e48 100644
--- a/Source/cmExprParser.y
+++ b/Source/cmExprParser.y
@@ -20,6 +20,7 @@ Run bison like this:
Modify cmExprParser.cxx:
- remove TABs
+ - remove use of the 'register' storage class specifier
- add __HP_aCC to the #if test for yyerrorlab warning suppression
*/
diff --git a/Source/cmFileCommand.cxx b/Source/cmFileCommand.cxx
index e72e756..4446f72 100644
--- a/Source/cmFileCommand.cxx
+++ b/Source/cmFileCommand.cxx
@@ -2489,7 +2489,7 @@ namespace {
cmWriteToFileCallback(void *ptr, size_t size, size_t nmemb,
void *data)
{
- register int realsize = (int)(size * nmemb);
+ int realsize = (int)(size * nmemb);
std::ofstream* fout = static_cast<std::ofstream*>(data);
const char* chPtr = static_cast<char*>(ptr);
fout->write(chPtr, realsize);
@@ -2501,7 +2501,7 @@ namespace {
cmWriteToMemoryCallback(void *ptr, size_t size, size_t nmemb,
void *data)
{
- register int realsize = (int)(size * nmemb);
+ int realsize = (int)(size * nmemb);
cmFileCommandVectorOfChar *vec
= static_cast<cmFileCommandVectorOfChar*>(data);
const char* chPtr = static_cast<char*>(ptr);
diff --git a/Source/cmListFileLexer.c b/Source/cmListFileLexer.c
index b6424d6..e7965b5 100644
--- a/Source/cmListFileLexer.c
+++ b/Source/cmListFileLexer.c
@@ -749,9 +749,9 @@ extern int cmListFileLexer_yylex (yyscan_t yyscanner);
*/
YY_DECL
{
- register yy_state_type yy_current_state;
- register char *yy_cp, *yy_bp;
- register int yy_act;
+ yy_state_type yy_current_state;
+ char *yy_cp, *yy_bp;
+ int yy_act;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
#line 100 "cmListFileLexer.in.l"
@@ -801,7 +801,7 @@ YY_DECL
yy_match:
do
{
- register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
+ YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1127,9 +1127,9 @@ ECHO;
static int yy_get_next_buffer (yyscan_t yyscanner)
{
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
- register char *source = yyg->yytext_ptr;
- register int number_to_move, i;
+ char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
+ char *source = yyg->yytext_ptr;
+ int number_to_move, i;
int ret_val;
if ( yyg->yy_c_buf_p > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[yyg->yy_n_chars + 1] )
@@ -1253,15 +1253,15 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
static yy_state_type yy_get_previous_state (yyscan_t yyscanner)
{
- register yy_state_type yy_current_state;
- register char *yy_cp;
+ yy_state_type yy_current_state;
+ char *yy_cp;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
yy_current_state = yyg->yy_start;
for ( yy_cp = yyg->yytext_ptr + YY_MORE_ADJ; yy_cp < yyg->yy_c_buf_p; ++yy_cp )
{
- register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
+ YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -1286,11 +1286,11 @@ static int yy_get_next_buffer (yyscan_t yyscanner)
*/
static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state , yyscan_t yyscanner)
{
- register int yy_is_jam;
+ int yy_is_jam;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
- register char *yy_cp = yyg->yy_c_buf_p;
+ char *yy_cp = yyg->yy_c_buf_p;
- register YY_CHAR yy_c = 1;
+ YY_CHAR yy_c = 1;
if ( yy_accept[yy_current_state] )
{
yyg->yy_last_accepting_state = yy_current_state;
@@ -2008,7 +2008,7 @@ int cmListFileLexer_yylex_destroy (yyscan_t yyscanner)
#ifndef yytext_ptr
static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yyscanner)
{
- register int i;
+ int i;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( i = 0; i < n; ++i )
s1[i] = s2[i];
@@ -2018,7 +2018,7 @@ static void yy_flex_strncpy (char* s1, yyconst char * s2, int n , yyscan_t yysca
#ifdef YY_NEED_STRLEN
static int yy_flex_strlen (yyconst char * s , yyscan_t yyscanner)
{
- register int n;
+ int n;
struct yyguts_t * yyg = (struct yyguts_t*)yyscanner;
for ( n = 0; s[n]; ++n )
;
diff --git a/Source/cmListFileLexer.in.l b/Source/cmListFileLexer.in.l
index 41e817b..eedf494 100644
--- a/Source/cmListFileLexer.in.l
+++ b/Source/cmListFileLexer.in.l
@@ -20,6 +20,7 @@ Run flex like this:
Modify cmListFileLexer.c:
- remove TABs
+ - remove use of the 'register' storage class specifier
- remove the yyunput function
- add a statement "(void)yyscanner;" to the top of these methods:
yy_fatal_error, cmListFileLexer_yyalloc, cmListFileLexer_yyrealloc, cmListFileLexer_yyfree