View | Details | Raw Unified | Return to bug 217152 | Differences between
and this patch

Collapse All | Expand All

(-)files/patch-SConstruct (-3 / +26 lines)
Lines 1-4 Link Here
1
--- SConstruct.orig	2012-01-11 17:56:10 UTC
1
--- SConstruct.orig	2018-07-11 16:37:51 UTC
2
+++ SConstruct
2
+++ SConstruct
3
@@ -162,22 +162,13 @@ if (len(COMMAND_LINE_TARGETS) == 0):
3
@@ -162,22 +162,13 @@ if (len(COMMAND_LINE_TARGETS) == 0):
4
 
4
 
Lines 25-35 Link Here
25
 		  variables = vars)
25
 		  variables = vars)
26
 
26
 
27
 prefix = env['prefix']
27
 prefix = env['prefix']
28
@@ -880,6 +871,7 @@ env.AppendUnique(CFLAGS = [
28
@@ -874,12 +865,14 @@ env.AppendUnique(CFLAGS = [
29
     '-Wcast-align',
29
     '-Wwrite-strings',
30
     '-Wbad-function-cast',
31
     '-Wmissing-prototypes',
32
-    '-Wcast-qual',
33
+    '-Wno-ncast-qual',
34
+    '-Wno-sign-compare',
35
     '-Wmissing-declarations',
36
     '-Wpointer-arith',
37
-    '-Wcast-align',
30
     '-Wstrict-prototypes',
38
     '-Wstrict-prototypes',
31
     '-Wnested-externs',
39
     '-Wnested-externs',
32
+    '-Wno-unused-function',
40
+    '-Wno-unused-function',
41
+    '-Wno-unused-parameter',
33
     '-pipe',
42
     '-pipe',
34
     ])
43
     ])
35
 
44
 
45
@@ -887,11 +880,10 @@ env.AppendUnique(CXXFLAGS = [
46
     '-W',
47
     '-Wall',
48
     '-Wwrite-strings',
49
-    '-Wcast-qual',
50
+    '-Wno-cast-qual',
51
+    '-Wno-sign-compare', 
52
     '-Wpointer-arith',
53
-    '-Wcast-align',
54
     '-Woverloaded-virtual',
55
-    '-ftemplate-depth-25',
56
     '-pipe',
57
     ])
58
 
(-)files/patch-cplfile.c (+35 lines)
Line 0 Link Here
1
--- cli/libtecla/cplfile.c.orig	2018-07-11 16:49:26 UTC
2
+++ cli/libtecla/cplfile.c
3
@@ -314,7 +314,7 @@ int _cf_complete_file(WordCompletion *cp
4
  * might be the start of the last component, and mark the character
5
  * that follows it as the start of the name that is to be completed.
6
  */
7
-      if(nleft >= FS_DIR_SEP_LEN &&
8
+      if((unsigned long)(nleft) >= FS_DIR_SEP_LEN &&
9
 	 strncmp(lptr + seglen, FS_DIR_SEP, FS_DIR_SEP_LEN)==0) {
10
 	word_start = (lptr + seglen) - line + FS_DIR_SEP_LEN;
11
       };
12
@@ -394,12 +394,12 @@ int _cf_complete_file(WordCompletion *cp
13
 /*
14
  * Prevent extra directory separators from being added.
15
  */
16
-	if(nleft >= FS_DIR_SEP_LEN &&
17
+	if((unsigned long)(nleft) >= FS_DIR_SEP_LEN &&
18
 	   strcmp(cf->path->name, FS_ROOT_DIR) == 0 &&
19
 	   strncmp(lptr, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0) {
20
 	  lptr += FS_DIR_SEP_LEN;
21
 	  nleft -= FS_DIR_SEP_LEN;
22
-	} else if(vlen > FS_DIR_SEP_LEN &&
23
+	} else if((unsigned long)(vlen) > FS_DIR_SEP_LEN &&
24
 		  strcmp(value + vlen - FS_DIR_SEP_LEN, FS_DIR_SEP)==0) {
25
 	  cf->path->name[vlen-FS_DIR_SEP_LEN] = '\0';
26
 	};
27
@@ -781,7 +781,7 @@ static char *cf_read_name(CompleteFile *
28
  * Get the environment variable name that follows the dollar.
29
  */
30
   for(sptr=string,namlen=0;
31
-      namlen < nmax && (slen-namlen < FS_DIR_SEP_LEN ||
32
+      namlen < nmax && ((unsigned long)(slen-namlen) < FS_DIR_SEP_LEN ||
33
 			strncmp(sptr, FS_DIR_SEP, FS_DIR_SEP_LEN) != 0);
34
       namlen++) {
35
     nambuf[namlen] = *sptr++;
(-)files/patch-element.hh (+11 lines)
Line 0 Link Here
1
--- policy/common/element.hh.orig	2018-07-03 02:07:04 UTC
2
+++ policy/common/element.hh
3
@@ -24,6 +24,7 @@
4
 #define __POLICY_COMMON_ELEMENT_HH__
5
 
6
 
7
+#pragma clang diagnostic ignored "-Wundefined-var-template"
8
 
9
 #include "libxorp/ipv4.hh"
10
 #include "libxorp/ipv6.hh"
11
(-)files/patch-expand.c (+11 lines)
Line 0 Link Here
1
--- cli/libtecla/expand.c.orig	2018-07-11 16:57:16 UTC
2
+++ cli/libtecla/expand.c
3
@@ -322,7 +322,7 @@ FileExpansion *ef_expand_file(ExpandFile
4
  * If the caller specified that the whole of path[] be matched,
5
  * work out the corresponding length.
6
  */
7
-  if(pathlen < 0 || pathlen > strlen(path))
8
+  if(pathlen < 0 || (unsigned long)(pathlen) > strlen(path))
9
     pathlen = strlen(path);
10
 /*
11
  * Discard previous expansion results.
(-)files/patch-getline.c (+56 lines)
Line 0 Link Here
1
--- cli/libtecla/getline.c.orig	2018-07-11 18:33:06 UTC
2
+++ cli/libtecla/getline.c
3
@@ -2180,7 +2180,7 @@ static int gl_add_char_to_line(GetLine *
4
  * If not, simply return, leaving it up to the calling program
5
  * to check for the absence of a newline character.
6
  */
7
-  if((gl->insert || buff_curpos >= gl->ntotal) && gl->ntotal >= gl->linelen)
8
+  if((gl->insert || buff_curpos >= gl->ntotal) && (unsigned long)(gl->ntotal) >= gl->linelen)
9
     return 0;
10
 /*
11
  * Are we adding characters to the line (ie. inserting or appending)?
12
@@ -2310,7 +2310,7 @@ static int gl_add_string_to_line(GetLine
13
  * If not, simply return, leaving it up to the calling program
14
  * to check for the absence of a newline character.
15
  */
16
-  if(gl->ntotal + buff_slen > gl->linelen)
17
+  if((unsigned long)((gl->ntotal + buff_slen)) > gl->linelen)
18
     return 0;
19
 /*
20
  * Move the characters that follow the cursor in the buffer by
21
@@ -4581,7 +4581,7 @@ static KT_KEY_FN(gl_complete_word)
22
 /*
23
  * Will there be space for the expansion in the line buffer?
24
  */
25
-      if(gl->ntotal + nextra < gl->linelen) {
26
+      if((unsigned long)((gl->ntotal + nextra)) < gl->linelen) {
27
 /*
28
  * Make room to insert the filename extension.
29
  */
30
@@ -4726,7 +4726,7 @@ static KT_KEY_FN(gl_expand_filename)
31
 /*
32
  * Will there be space for the expansion in the line buffer?
33
  */
34
-  if(gl->ntotal + nextra >= gl->linelen) {
35
+  if((unsigned long)((gl->ntotal + nextra)) >= gl->linelen) {
36
     fprintf(stderr, "\r\nInsufficient room in line for file expansion.\r\n");
37
     redisplay = 1;
38
   } else {
39
@@ -7104,7 +7104,7 @@ static int gl_interpret_char(GetLine *gl
40
  * input line buffer, and watch for the end of the line.
41
  */
42
   if(gl->editor == GL_NO_EDITOR) {
43
-    if(gl->ntotal >= gl->linelen) {
44
+    if((unsigned long)(gl->ntotal) >= gl->linelen) {
45
       ret = 0;
46
       goto ret_label;
47
     }
48
@@ -7813,7 +7813,7 @@ int gl_group_history(GetLine *gl, unsign
49
 /*
50
  * If the group isn't being changed, do nothing.
51
  */
52
-  if(_glh_get_group(gl->glh) == id)
53
+  if((unsigned int)((_glh_get_group(gl->glh))) == id)
54
     return 0;
55
 /*
56
  * Establish the new group.
(-)files/patch-history.c (+48 lines)
Line 0 Link Here
1
--- cli/libtecla/history.c.orig	2018-07-11 18:08:59 UTC
2
+++ cli/libtecla/history.c
3
@@ -253,7 +253,7 @@ int _glh_add_history(GlHistory *glh, con
4
 /*
5
  * If the line is too big to fit in the buffer, truncate it.
6
  */
7
-  if(nchar > glh->buflen)
8
+  if((unsigned long)(nchar) > glh->buflen)
9
     nchar = glh->buflen;
10
 /*
11
  * Is the line empty?
12
@@ -272,7 +272,7 @@ int _glh_add_history(GlHistory *glh, con
13
  * don't add it again, unless explicitly told to.
14
  */
15
   if(!force &&
16
-     list->tail && strlen(glh->buffer + list->tail->start) == nchar-1 &&
17
+     list->tail && strlen(glh->buffer + list->tail->start) == (unsigned long)((nchar-1)) &&
18
      strncmp(line, glh->buffer + list->tail->start, nchar-1)==0)
19
     return 0;
20
 /*
21
@@ -311,7 +311,7 @@ int _glh_add_history(GlHistory *glh, con
22
  * at the end of the buffer, then shift the remaining contents
23
  * of the buffer to the end of the buffer.
24
  */
25
-    if(start + nchar >= glh->buflen) {
26
+    if(start + (unsigned long)(nchar) >= glh->buflen) {
27
       GlLineNode *last; /* The last line in the buffer */
28
       GlLineNode *ln;   /* A member of the list of line locations */
29
       int shift;        /* The shift needed to move the contents of the */
30
@@ -1897,15 +1897,15 @@ static GlLineNode *_glh_find_id(GlHistor
31
 /*
32
  * Search forwards from 'node'?
33
  */
34
-  if(node->id < id) {
35
-    while(node && node->id != id)
36
+  if((unsigned long)(node->id) < id) {
37
+    while(node && (unsigned long)(node->id) != id)
38
       node = node->next;
39
     glh->id_node = node ? node : glh->list.tail;
40
 /*
41
  * Search backwards from 'node'?
42
  */
43
   } else {
44
-    while(node && node->id != id)
45
+    while(node && (unsigned long)(node->id) != id)
46
       node = node->prev;
47
     glh->id_node = node ? node : glh->list.head;
48
   };
(-)files/patch-homedir.c (+11 lines)
Line 0 Link Here
1
--- cli/libtecla/homedir.c.orig	2018-07-11 18:41:32 UTC
2
+++ cli/libtecla/homedir.c
3
@@ -146,7 +146,7 @@ HomeDir *_new_HomeDir(void)
4
  * a pathname, increase its length.
5
  */
6
   pathlen = _pu_pathname_dim();
7
-  if(pathlen > home->buflen)
8
+  if(pathlen > (unsigned long)(home->buflen))
9
     home->buflen = pathlen;
10
 /*
11
  * Allocate a work buffer.
(-)files/patch-io__ip__socket.cc (+16 lines)
Line 0 Link Here
1
--- fea/data_plane/io/io_ip_socket.cc.orig	2018-07-10 15:49:50 UTC
2
+++ fea/data_plane/io/io_ip_socket.cc
3
@@ -2293,10 +2293,10 @@ IoIpSocket::send_packet(const string& if
4
 	    //
5
 	    struct sockaddr_in sin;
6
 	    src_address.copy_out(sin);
7
-	    if (bind(_proto_socket_out,
8
+	    bind(_proto_socket_out,
9
 		     reinterpret_cast<struct sockaddr*>(&sin),
10
-		     sizeof(sin))
11
-		< 0) {
12
+		     sizeof(sin));
13
+		if ( reinterpret_cast<struct sockaddr*>(&sin) < ((void*)0)) {
14
 		error_msg = c_format("raw socket bind(%s) failed: %s",
15
 				     cstring(src_address), XSTRERROR);
16
 		XLOG_ERROR("%s", error_msg.c_str());
(-)files/patch-lex.boot.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.boot.cc.orig	2018-07-12 14:00:49 UTC
2
+++ rtrmgr/lex.boot.cc
3
@@ -9674,9 +9674,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 242 "boot.ll"
15
 
16
@@ -9723,7 +9723,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -10246,9 +10246,9 @@ case YY_STATE_EOF(arith):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -10378,14 +10378,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -10417,10 +10417,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -10441,14 +10441,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -10456,10 +10456,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -10921,7 +10921,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -10935,7 +10935,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.opcmd.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.opcmd.cc.orig	2018-07-12 13:48:34 UTC
2
+++ rtrmgr/lex.opcmd.cc
3
@@ -640,9 +640,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 31 "op_commands.ll"
15
 
16
@@ -689,7 +689,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -1085,9 +1085,9 @@ case YY_STATE_EOF(string):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -1217,14 +1217,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -1256,10 +1256,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -1280,14 +1280,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -1295,10 +1295,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -1760,7 +1760,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -1774,7 +1774,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.tplt.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.tplt.cc.orig	2018-07-12 13:54:23 UTC
2
+++ rtrmgr/lex.tplt.cc
3
@@ -8789,9 +8789,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 230 "template.ll"
15
 
16
@@ -8838,7 +8838,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -9471,9 +9471,9 @@ case YY_STATE_EOF(string):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -9603,14 +9603,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -9642,10 +9642,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -9666,14 +9666,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -9681,10 +9681,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -10146,7 +10146,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -10160,7 +10160,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.yy__policy__backend__parser.cc (+87 lines)
Line 0 Link Here
1
--- policy/backend/lex.yy_policy_backend_parser.cc.orig	2018-07-10 15:46:56 UTC
2
+++ policy/backend/lex.yy_policy_backend_parser.cc
3
@@ -728,9 +728,9 @@ extern int yy_policy_backend_parserlex (
4
  */
5
 YY_DECL
6
 {
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
     
14
 #line 40 "backend.l"
15
 
16
@@ -779,7 +779,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				(yy_last_accepting_state) = yy_current_state;
25
@@ -1171,9 +1171,9 @@ case YY_STATE_EOF(STR):
26
  */
27
 static int yy_get_next_buffer (void)
28
 {
29
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
30
-	register char *source = (yytext_ptr);
31
-	register int number_to_move, i;
32
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
33
+	char *source = (yytext_ptr);
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
38
@@ -1297,14 +1297,14 @@ static int yy_get_next_buffer (void)
39
 
40
     static yy_state_type yy_get_previous_state (void)
41
 {
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
     
47
 	yy_current_state = (yy_start);
48
 
49
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			(yy_last_accepting_state) = yy_current_state;
56
@@ -1329,10 +1329,10 @@ static int yy_get_next_buffer (void)
57
  */
58
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
59
 {
60
-	register int yy_is_jam;
61
-    	register char *yy_cp = (yy_c_buf_p);
62
+	int yy_is_jam;
63
+    	char *yy_cp = (yy_c_buf_p);
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		(yy_last_accepting_state) = yy_current_state;
70
@@ -1933,7 +1933,7 @@ int yy_policy_backend_parserlex_destroy 
71
 #ifndef yytext_ptr
72
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
73
 {
74
-	register int i;
75
+	int i;
76
 	for ( i = 0; i < n; ++i )
77
 		s1[i] = s2[i];
78
 }
79
@@ -1942,7 +1942,7 @@ static void yy_flex_strncpy (char* s1, y
80
 #ifdef YY_NEED_STRLEN
81
 static int yy_flex_strlen (yyconst char * s )
82
 {
83
-	register int n;
84
+	int n;
85
 	for ( n = 0; s[n]; ++n )
86
 		;
87
 
(-)files/patch-lex.yy__policy__parser.cc (+87 lines)
Line 0 Link Here
1
--- policy/lex.yy_policy_parser.cc.orig	2018-07-12 13:40:14 UTC
2
+++ policy/lex.yy_policy_parser.cc
3
@@ -3092,9 +3092,9 @@ extern int yy_policy_parserlex (void);
4
  */
5
 YY_DECL
6
 {
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
     
14
 #line 62 "policy.l"
15
 
16
@@ -3143,7 +3143,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				(yy_last_accepting_state) = yy_current_state;
25
@@ -3667,9 +3667,9 @@ case YY_STATE_EOF(STR):
26
  */
27
 static int yy_get_next_buffer (void)
28
 {
29
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
30
-	register char *source = (yytext_ptr);
31
-	register int number_to_move, i;
32
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
33
+	char *source = (yytext_ptr);
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
38
@@ -3793,14 +3793,14 @@ static int yy_get_next_buffer (void)
39
 
40
     static yy_state_type yy_get_previous_state (void)
41
 {
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
     
47
 	yy_current_state = (yy_start);
48
 
49
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			(yy_last_accepting_state) = yy_current_state;
56
@@ -3825,10 +3825,10 @@ static int yy_get_next_buffer (void)
57
  */
58
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
59
 {
60
-	register int yy_is_jam;
61
-    	register char *yy_cp = (yy_c_buf_p);
62
+	int yy_is_jam;
63
+    	char *yy_cp = (yy_c_buf_p);
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		(yy_last_accepting_state) = yy_current_state;
70
@@ -4429,7 +4429,7 @@ int yy_policy_parserlex_destroy  (void)
71
 #ifndef yytext_ptr
72
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
73
 {
74
-	register int i;
75
+	int i;
76
 	for ( i = 0; i < n; ++i )
77
 		s1[i] = s2[i];
78
 }
79
@@ -4438,7 +4438,7 @@ static void yy_flex_strncpy (char* s1, y
80
 #ifdef YY_NEED_STRLEN
81
 static int yy_flex_strlen (yyconst char * s )
82
 {
83
-	register int n;
84
+	int n;
85
 	for ( n = 0; s[n]; ++n )
86
 		;
87
 
(-)files/patch-libproto__packet.cc (-1 / +12 lines)
Lines 1-5 Link Here
1
--- libproto/packet.cc.orig	2012-01-11 17:56:10 UTC
1
--- libproto/packet.cc.orig	2018-07-10 12:55:07 UTC
2
+++ libproto/packet.cc
2
+++ libproto/packet.cc
3
@@ -88,8 +88,8 @@ IpHeader4::fragment(size_t mtu, list<vec
4
     //
5
     memcpy(&frag_buf[0], _data, IpHeader4::SIZE);
6
     {
7
-	register const u_char *cp;
8
-	register u_char *dp;
9
+	const u_char *cp;
10
+	u_char *dp;
11
 	int opt, optlen, cnt;
12
 
13
 	cp = (const u_char *)(orig_ip4.data() + orig_ip4.size());
3
@@ -233,7 +233,7 @@ IpHeader4Writer::compute_checksum()
14
@@ -233,7 +233,7 @@ IpHeader4Writer::compute_checksum()
4
 }
15
 }
5
 
16
 
(-)files/patch-netstream__access.h (+74 lines)
Line 0 Link Here
1
--- mrt/netstream_access.h.orig	2018-07-12 13:27:04 UTC
2
+++ mrt/netstream_access.h
3
@@ -120,7 +120,7 @@ do {									\
4
 
5
 #define GET_HOST_16(val, cp, rcvlen)					\
6
 do {									\
7
-	register uint16_t v_;						\
8
+	uint16_t v_;						\
9
 									\
10
 	if ((size_t)(rcvlen) < (size_t)2)				\
11
 		goto rcvlen_error;					\
12
@@ -132,7 +132,7 @@ do {									\
13
 
14
 #define PUT_HOST_16(val, cp, buflen)					\
15
 do {									\
16
-	register uint16_t v_;						\
17
+	uint16_t v_;						\
18
 									\
19
 	if ((size_t)(buflen) < (size_t)2)				\
20
 		goto buflen_error;					\
21
@@ -145,7 +145,7 @@ do {									\
22
 #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
23
 #define GET_NET_16(val, cp, rcvlen)					\
24
 do {									\
25
-	register uint16_t v_;						\
26
+	uint16_t v_;						\
27
 									\
28
 	if ((size_t)(rcvlen) < (size_t)2)				\
29
 		goto rcvlen_error;					\
30
@@ -156,7 +156,7 @@ do {									\
31
 } while (0)
32
 #define PUT_NET_16(val, cp, buflen)					\
33
 do {									\
34
-	register uint16_t v_;						\
35
+	uint16_t v_;						\
36
 									\
37
 	if ((size_t)(buflen) < (size_t)2)				\
38
 		goto buflen_error;					\
39
@@ -174,7 +174,7 @@ do {									\
40
 
41
 #define GET_HOST_32(val, cp, rcvlen)					\
42
 do {									\
43
-	register uint32_t v_;						\
44
+	uint32_t v_;						\
45
 									\
46
 	if ((size_t)(rcvlen) < (size_t)4)				\
47
 		goto rcvlen_error;					\
48
@@ -188,7 +188,7 @@ do {									\
49
 
50
 #define PUT_HOST_32(val, cp, buflen)					\
51
 do {									\
52
-	register uint32_t v_;						\
53
+	uint32_t v_;						\
54
 									\
55
 	if ((size_t)(buflen) < (size_t)4)				\
56
 		goto buflen_error;					\
57
@@ -203,7 +203,7 @@ do {									\
58
 #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
59
 #define GET_NET_32(val, cp, rcvlen)					\
60
 do {									\
61
-	register uint32_t v_;						\
62
+	uint32_t v_;						\
63
 									\
64
 	if ((size_t)(rcvlen) < (size_t)4)				\
65
 		goto rcvlen_error;					\
66
@@ -217,7 +217,7 @@ do {									\
67
 
68
 #define PUT_NET_32(val, cp, buflen)					\
69
 do {									\
70
-	register uint32_t v_;						\
71
+	uint32_t v_;						\
72
 									\
73
 	if ((size_t)(buflen) < (size_t)4)				\
74
 		goto buflen_error;					\
(-)files/patch-pathutil.c (+38 lines)
Line 0 Link Here
1
--- cli/libtecla/pathutil.c.orig	2018-07-10 13:09:21 UTC
2
+++ cli/libtecla/pathutil.c
3
@@ -168,7 +168,7 @@ char *_pn_append_to_path(PathName *path,
4
 /*
5
  * How many characters should be appended?
6
  */
7
-  if(slen < 0 || slen > strlen(string))
8
+  if(slen < 0 || (unsigned long)(slen) > strlen(string))
9
     slen = strlen(string);
10
 /*
11
  * Resize the pathname if needed.
12
@@ -239,7 +239,7 @@ char *_pn_prepend_to_path(PathName *path
13
 /*
14
  * How many characters should be appended?
15
  */
16
-  if(slen < 0 || slen > strlen(string))
17
+  if(slen < 0 || (unsigned long)(slen) > strlen(string))
18
     slen = strlen(string);
19
 /*
20
  * Work out how far we need to shift the original path string to make
21
@@ -494,7 +494,7 @@ char *_pu_start_of_path(const char *stri
22
 	break;
23
     };
24
   };
25
-  return (char *)string + i + 1;
26
+  return (char *)(string + i + 1);
27
 }
28
 
29
 /*.......................................................................
30
@@ -534,7 +534,7 @@ char *_pu_end_of_path(const char *string
31
       escaped = 1;
32
     };
33
   };
34
-  return (char *)string + i;
35
+  return (char *)(string + i);
36
 }
37
 
38
 /*.......................................................................
(-)files/patch-pcache.c (+38 lines)
Line 0 Link Here
1
--- cli/libtecla/pcache.c.orig	2018-07-11 18:23:55 UTC
2
+++ cli/libtecla/pcache.c
3
@@ -601,7 +601,7 @@ static int pca_extract_dir(PathCache *pc
4
  */
5
   {
6
     int dirlen = strlen(pc->path->name);
7
-    if(dirlen < FS_DIR_SEP_LEN ||
8
+    if((unsigned long)(dirlen) < FS_DIR_SEP_LEN ||
9
        strncmp(pc->path->name + dirlen - FS_DIR_SEP_LEN, FS_DIR_SEP,
10
 	       FS_DIR_SEP_LEN) != 0) {
11
       if(_pn_append_to_path(pc->path, FS_DIR_SEP, FS_DIR_SEP_LEN, 0) == NULL) {
12
@@ -1500,7 +1500,7 @@ static int cpa_cmd_contains_path(const c
13
  * If the filename starts with the root directory, then it obviously
14
  * starts with a pathname.
15
  */
16
-  if(prefix_len >= FS_ROOT_DIR_LEN && 
17
+  if((unsigned long)(prefix_len) >= FS_ROOT_DIR_LEN && 
18
      strncmp(prefix, FS_ROOT_DIR, FS_ROOT_DIR_LEN) == 0)
19
     return 1;
20
 /*
21
@@ -1509,7 +1509,7 @@ static int cpa_cmd_contains_path(const c
22
  * starts with a pathname specification (valid or otherwise).
23
  */
24
   for(i=0; i<prefix_len; i++) {
25
-    if(prefix_len - i >= FS_DIR_SEP_LEN &&
26
+    if((unsigned long)((prefix_len - i)) >= FS_DIR_SEP_LEN &&
27
        strncmp(prefix + i, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0)
28
       return 1;
29
   };
30
@@ -1653,7 +1653,7 @@ static int pca_expand_tilde(PathCache *p
31
  * skip over it so that it doesn't get copied into the output pathname
32
  */
33
   if(homedir && strcmp(homedir, FS_ROOT_DIR) == 0 &&
34
-     (pptr-path) + FS_DIR_SEP_LEN < pathlen &&
35
+     (pptr-path) + FS_DIR_SEP_LEN < (unsigned long)(pathlen) &&
36
      strncmp(pptr, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0) {
37
     pptr += FS_DIR_SEP_LEN;
38
   };
(-)files/patch-popen.cc (+11 lines)
Line 0 Link Here
1
--- libxorp/popen.cc.orig	2018-07-10 12:54:42 UTC
2
+++ libxorp/popen.cc
3
@@ -424,7 +424,7 @@ popen2(const string& command, const list
4
 int
5
 pclose2(FILE *iop_out, bool dont_wait)
6
 {
7
-    register struct pid_s *cur, *last;
8
+    struct pid_s *cur, *last;
9
     int pstat = 0;
10
     pid_t pid = 0;
11
 
(-)files/patch-strptime.c (+15 lines)
Line 0 Link Here
1
--- libxorp/strptime.c.orig	2018-07-10 12:54:53 UTC
2
+++ libxorp/strptime.c
3
@@ -85,10 +85,10 @@
4
 #define TM_YEAR_BASE 1900
5
 #endif
6
 
7
-static inline void *
8
+static inline const char *
9
 UNCONST(const void *a)
10
 {
11
-	return ((const char *)a - (const char *)0) + (char *)0;
12
+	return ((const char *)a - sizeof((const char *)0)) + sizeof((char *)0);
13
 }
14
 
15
 
(-)files/patch-y.boot__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.boot_tab.cc.orig	2018-07-12 14:14:48 UTC
2
+++ rtrmgr/y.boot_tab.cc
3
@@ -474,9 +474,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/patch-y.opcmd__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.opcmd_tab.cc.orig	2018-07-12 14:13:19 UTC
2
+++ rtrmgr/y.opcmd_tab.cc
3
@@ -684,9 +684,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/patch-y.tplt__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.tplt_tab.cc.orig	2018-07-12 14:20:17 UTC
2
+++ rtrmgr/y.tplt_tab.cc
3
@@ -552,9 +552,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/xorp.in (-1 / +1 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD$
3
# $FreeBSD: head/net/xorp/files/xorp.in 346231 2014-02-26 21:54:59Z antoine $
4
#
4
#
5
# A sample XORP startup script.
5
# A sample XORP startup script.
6
#
6
#
(-)files/patch-SConstruct (-3 / +26 lines)
Lines 1-4 Link Here
1
--- SConstruct.orig	2012-01-11 17:56:10 UTC
1
--- SConstruct.orig	2018-07-11 16:37:51 UTC
2
+++ SConstruct
2
+++ SConstruct
3
@@ -162,22 +162,13 @@ if (len(COMMAND_LINE_TARGETS) == 0):
3
@@ -162,22 +162,13 @@ if (len(COMMAND_LINE_TARGETS) == 0):
4
 
4
 
Lines 25-35 Link Here
25
 		  variables = vars)
25
 		  variables = vars)
26
 
26
 
27
 prefix = env['prefix']
27
 prefix = env['prefix']
28
@@ -880,6 +871,7 @@ env.AppendUnique(CFLAGS = [
28
@@ -874,12 +865,14 @@ env.AppendUnique(CFLAGS = [
29
     '-Wcast-align',
29
     '-Wwrite-strings',
30
     '-Wbad-function-cast',
31
     '-Wmissing-prototypes',
32
-    '-Wcast-qual',
33
+    '-Wno-ncast-qual',
34
+    '-Wno-sign-compare',
35
     '-Wmissing-declarations',
36
     '-Wpointer-arith',
37
-    '-Wcast-align',
30
     '-Wstrict-prototypes',
38
     '-Wstrict-prototypes',
31
     '-Wnested-externs',
39
     '-Wnested-externs',
32
+    '-Wno-unused-function',
40
+    '-Wno-unused-function',
41
+    '-Wno-unused-parameter',
33
     '-pipe',
42
     '-pipe',
34
     ])
43
     ])
35
 
44
 
45
@@ -887,11 +880,10 @@ env.AppendUnique(CXXFLAGS = [
46
     '-W',
47
     '-Wall',
48
     '-Wwrite-strings',
49
-    '-Wcast-qual',
50
+    '-Wno-cast-qual',
51
+    '-Wno-sign-compare', 
52
     '-Wpointer-arith',
53
-    '-Wcast-align',
54
     '-Woverloaded-virtual',
55
-    '-ftemplate-depth-25',
56
     '-pipe',
57
     ])
58
 
(-)files/patch-cplfile.c (+35 lines)
Line 0 Link Here
1
--- cli/libtecla/cplfile.c.orig	2018-07-11 16:49:26 UTC
2
+++ cli/libtecla/cplfile.c
3
@@ -314,7 +314,7 @@ int _cf_complete_file(WordCompletion *cp
4
  * might be the start of the last component, and mark the character
5
  * that follows it as the start of the name that is to be completed.
6
  */
7
-      if(nleft >= FS_DIR_SEP_LEN &&
8
+      if((unsigned long)(nleft) >= FS_DIR_SEP_LEN &&
9
 	 strncmp(lptr + seglen, FS_DIR_SEP, FS_DIR_SEP_LEN)==0) {
10
 	word_start = (lptr + seglen) - line + FS_DIR_SEP_LEN;
11
       };
12
@@ -394,12 +394,12 @@ int _cf_complete_file(WordCompletion *cp
13
 /*
14
  * Prevent extra directory separators from being added.
15
  */
16
-	if(nleft >= FS_DIR_SEP_LEN &&
17
+	if((unsigned long)(nleft) >= FS_DIR_SEP_LEN &&
18
 	   strcmp(cf->path->name, FS_ROOT_DIR) == 0 &&
19
 	   strncmp(lptr, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0) {
20
 	  lptr += FS_DIR_SEP_LEN;
21
 	  nleft -= FS_DIR_SEP_LEN;
22
-	} else if(vlen > FS_DIR_SEP_LEN &&
23
+	} else if((unsigned long)(vlen) > FS_DIR_SEP_LEN &&
24
 		  strcmp(value + vlen - FS_DIR_SEP_LEN, FS_DIR_SEP)==0) {
25
 	  cf->path->name[vlen-FS_DIR_SEP_LEN] = '\0';
26
 	};
27
@@ -781,7 +781,7 @@ static char *cf_read_name(CompleteFile *
28
  * Get the environment variable name that follows the dollar.
29
  */
30
   for(sptr=string,namlen=0;
31
-      namlen < nmax && (slen-namlen < FS_DIR_SEP_LEN ||
32
+      namlen < nmax && ((unsigned long)(slen-namlen) < FS_DIR_SEP_LEN ||
33
 			strncmp(sptr, FS_DIR_SEP, FS_DIR_SEP_LEN) != 0);
34
       namlen++) {
35
     nambuf[namlen] = *sptr++;
(-)files/patch-element.hh (+11 lines)
Line 0 Link Here
1
--- policy/common/element.hh.orig	2018-07-03 02:07:04 UTC
2
+++ policy/common/element.hh
3
@@ -24,6 +24,7 @@
4
 #define __POLICY_COMMON_ELEMENT_HH__
5
 
6
 
7
+#pragma clang diagnostic ignored "-Wundefined-var-template"
8
 
9
 #include "libxorp/ipv4.hh"
10
 #include "libxorp/ipv6.hh"
11
(-)files/patch-expand.c (+11 lines)
Line 0 Link Here
1
--- cli/libtecla/expand.c.orig	2018-07-11 16:57:16 UTC
2
+++ cli/libtecla/expand.c
3
@@ -322,7 +322,7 @@ FileExpansion *ef_expand_file(ExpandFile
4
  * If the caller specified that the whole of path[] be matched,
5
  * work out the corresponding length.
6
  */
7
-  if(pathlen < 0 || pathlen > strlen(path))
8
+  if(pathlen < 0 || (unsigned long)(pathlen) > strlen(path))
9
     pathlen = strlen(path);
10
 /*
11
  * Discard previous expansion results.
(-)files/patch-getline.c (+56 lines)
Line 0 Link Here
1
--- cli/libtecla/getline.c.orig	2018-07-11 18:33:06 UTC
2
+++ cli/libtecla/getline.c
3
@@ -2180,7 +2180,7 @@ static int gl_add_char_to_line(GetLine *
4
  * If not, simply return, leaving it up to the calling program
5
  * to check for the absence of a newline character.
6
  */
7
-  if((gl->insert || buff_curpos >= gl->ntotal) && gl->ntotal >= gl->linelen)
8
+  if((gl->insert || buff_curpos >= gl->ntotal) && (unsigned long)(gl->ntotal) >= gl->linelen)
9
     return 0;
10
 /*
11
  * Are we adding characters to the line (ie. inserting or appending)?
12
@@ -2310,7 +2310,7 @@ static int gl_add_string_to_line(GetLine
13
  * If not, simply return, leaving it up to the calling program
14
  * to check for the absence of a newline character.
15
  */
16
-  if(gl->ntotal + buff_slen > gl->linelen)
17
+  if((unsigned long)((gl->ntotal + buff_slen)) > gl->linelen)
18
     return 0;
19
 /*
20
  * Move the characters that follow the cursor in the buffer by
21
@@ -4581,7 +4581,7 @@ static KT_KEY_FN(gl_complete_word)
22
 /*
23
  * Will there be space for the expansion in the line buffer?
24
  */
25
-      if(gl->ntotal + nextra < gl->linelen) {
26
+      if((unsigned long)((gl->ntotal + nextra)) < gl->linelen) {
27
 /*
28
  * Make room to insert the filename extension.
29
  */
30
@@ -4726,7 +4726,7 @@ static KT_KEY_FN(gl_expand_filename)
31
 /*
32
  * Will there be space for the expansion in the line buffer?
33
  */
34
-  if(gl->ntotal + nextra >= gl->linelen) {
35
+  if((unsigned long)((gl->ntotal + nextra)) >= gl->linelen) {
36
     fprintf(stderr, "\r\nInsufficient room in line for file expansion.\r\n");
37
     redisplay = 1;
38
   } else {
39
@@ -7104,7 +7104,7 @@ static int gl_interpret_char(GetLine *gl
40
  * input line buffer, and watch for the end of the line.
41
  */
42
   if(gl->editor == GL_NO_EDITOR) {
43
-    if(gl->ntotal >= gl->linelen) {
44
+    if((unsigned long)(gl->ntotal) >= gl->linelen) {
45
       ret = 0;
46
       goto ret_label;
47
     }
48
@@ -7813,7 +7813,7 @@ int gl_group_history(GetLine *gl, unsign
49
 /*
50
  * If the group isn't being changed, do nothing.
51
  */
52
-  if(_glh_get_group(gl->glh) == id)
53
+  if((unsigned int)((_glh_get_group(gl->glh))) == id)
54
     return 0;
55
 /*
56
  * Establish the new group.
(-)files/patch-history.c (+48 lines)
Line 0 Link Here
1
--- cli/libtecla/history.c.orig	2018-07-11 18:08:59 UTC
2
+++ cli/libtecla/history.c
3
@@ -253,7 +253,7 @@ int _glh_add_history(GlHistory *glh, con
4
 /*
5
  * If the line is too big to fit in the buffer, truncate it.
6
  */
7
-  if(nchar > glh->buflen)
8
+  if((unsigned long)(nchar) > glh->buflen)
9
     nchar = glh->buflen;
10
 /*
11
  * Is the line empty?
12
@@ -272,7 +272,7 @@ int _glh_add_history(GlHistory *glh, con
13
  * don't add it again, unless explicitly told to.
14
  */
15
   if(!force &&
16
-     list->tail && strlen(glh->buffer + list->tail->start) == nchar-1 &&
17
+     list->tail && strlen(glh->buffer + list->tail->start) == (unsigned long)((nchar-1)) &&
18
      strncmp(line, glh->buffer + list->tail->start, nchar-1)==0)
19
     return 0;
20
 /*
21
@@ -311,7 +311,7 @@ int _glh_add_history(GlHistory *glh, con
22
  * at the end of the buffer, then shift the remaining contents
23
  * of the buffer to the end of the buffer.
24
  */
25
-    if(start + nchar >= glh->buflen) {
26
+    if(start + (unsigned long)(nchar) >= glh->buflen) {
27
       GlLineNode *last; /* The last line in the buffer */
28
       GlLineNode *ln;   /* A member of the list of line locations */
29
       int shift;        /* The shift needed to move the contents of the */
30
@@ -1897,15 +1897,15 @@ static GlLineNode *_glh_find_id(GlHistor
31
 /*
32
  * Search forwards from 'node'?
33
  */
34
-  if(node->id < id) {
35
-    while(node && node->id != id)
36
+  if((unsigned long)(node->id) < id) {
37
+    while(node && (unsigned long)(node->id) != id)
38
       node = node->next;
39
     glh->id_node = node ? node : glh->list.tail;
40
 /*
41
  * Search backwards from 'node'?
42
  */
43
   } else {
44
-    while(node && node->id != id)
45
+    while(node && (unsigned long)(node->id) != id)
46
       node = node->prev;
47
     glh->id_node = node ? node : glh->list.head;
48
   };
(-)files/patch-homedir.c (+11 lines)
Line 0 Link Here
1
--- cli/libtecla/homedir.c.orig	2018-07-11 18:41:32 UTC
2
+++ cli/libtecla/homedir.c
3
@@ -146,7 +146,7 @@ HomeDir *_new_HomeDir(void)
4
  * a pathname, increase its length.
5
  */
6
   pathlen = _pu_pathname_dim();
7
-  if(pathlen > home->buflen)
8
+  if(pathlen > (unsigned long)(home->buflen))
9
     home->buflen = pathlen;
10
 /*
11
  * Allocate a work buffer.
(-)files/patch-io__ip__socket.cc (+16 lines)
Line 0 Link Here
1
--- fea/data_plane/io/io_ip_socket.cc.orig	2018-07-10 15:49:50 UTC
2
+++ fea/data_plane/io/io_ip_socket.cc
3
@@ -2293,10 +2293,10 @@ IoIpSocket::send_packet(const string& if
4
 	    //
5
 	    struct sockaddr_in sin;
6
 	    src_address.copy_out(sin);
7
-	    if (bind(_proto_socket_out,
8
+	    bind(_proto_socket_out,
9
 		     reinterpret_cast<struct sockaddr*>(&sin),
10
-		     sizeof(sin))
11
-		< 0) {
12
+		     sizeof(sin));
13
+		if ( reinterpret_cast<struct sockaddr*>(&sin) < ((void*)0)) {
14
 		error_msg = c_format("raw socket bind(%s) failed: %s",
15
 				     cstring(src_address), XSTRERROR);
16
 		XLOG_ERROR("%s", error_msg.c_str());
(-)files/patch-lex.boot.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.boot.cc.orig	2018-07-12 14:00:49 UTC
2
+++ rtrmgr/lex.boot.cc
3
@@ -9674,9 +9674,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 242 "boot.ll"
15
 
16
@@ -9723,7 +9723,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -10246,9 +10246,9 @@ case YY_STATE_EOF(arith):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -10378,14 +10378,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -10417,10 +10417,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -10441,14 +10441,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -10456,10 +10456,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -10921,7 +10921,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -10935,7 +10935,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.opcmd.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.opcmd.cc.orig	2018-07-12 13:48:34 UTC
2
+++ rtrmgr/lex.opcmd.cc
3
@@ -640,9 +640,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 31 "op_commands.ll"
15
 
16
@@ -689,7 +689,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -1085,9 +1085,9 @@ case YY_STATE_EOF(string):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -1217,14 +1217,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -1256,10 +1256,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -1280,14 +1280,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -1295,10 +1295,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -1760,7 +1760,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -1774,7 +1774,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.tplt.cc (+119 lines)
Line 0 Link Here
1
--- rtrmgr/lex.tplt.cc.orig	2018-07-12 13:54:23 UTC
2
+++ rtrmgr/lex.tplt.cc
3
@@ -8789,9 +8789,9 @@ YY_MALLOC_DECL
4
 
5
 YY_DECL
6
 	{
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
 
14
 #line 230 "template.ll"
15
 
16
@@ -8838,7 +8838,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				yy_last_accepting_state = yy_current_state;
25
@@ -9471,9 +9471,9 @@ case YY_STATE_EOF(string):
26
 
27
 static int yy_get_next_buffer()
28
 	{
29
-	register char *dest = yy_current_buffer->yy_ch_buf;
30
-	register char *source = yytext_ptr;
31
-	register int number_to_move, i;
32
+	char *dest = yy_current_buffer->yy_ch_buf;
33
+	char *source = yytext_ptr;
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( yy_c_buf_p > &yy_current_buffer->yy_ch_buf[yy_n_chars + 1] )
38
@@ -9603,14 +9603,14 @@ static int yy_get_next_buffer()
39
 
40
 static yy_state_type yy_get_previous_state()
41
 	{
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
 
47
 	yy_current_state = yy_start;
48
 
49
 	for ( yy_cp = yytext_ptr + YY_MORE_ADJ; yy_cp < yy_c_buf_p; ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			yy_last_accepting_state = yy_current_state;
56
@@ -9642,10 +9642,10 @@ static yy_state_type yy_try_NUL_trans( y
57
 yy_state_type yy_current_state;
58
 #endif
59
 	{
60
-	register int yy_is_jam;
61
-	register char *yy_cp = yy_c_buf_p;
62
+	int yy_is_jam;
63
+	char *yy_cp = yy_c_buf_p;
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		yy_last_accepting_state = yy_current_state;
70
@@ -9666,14 +9666,14 @@ yy_state_type yy_current_state;
71
 
72
 #ifndef YY_NO_UNPUT
73
 #ifdef YY_USE_PROTOS
74
-static void yyunput( int c, register char *yy_bp )
75
+static void yyunput( int c, char *yy_bp )
76
 #else
77
 static void yyunput( c, yy_bp )
78
 int c;
79
-register char *yy_bp;
80
+char *yy_bp;
81
 #endif
82
 	{
83
-	register char *yy_cp = yy_c_buf_p;
84
+	char *yy_cp = yy_c_buf_p;
85
 
86
 	/* undo effects of setting up yytext */
87
 	*yy_cp = yy_hold_char;
88
@@ -9681,10 +9681,10 @@ register char *yy_bp;
89
 	if ( yy_cp < yy_current_buffer->yy_ch_buf + 2 )
90
 		{ /* need to shift things up to make room */
91
 		/* +2 for EOB chars. */
92
-		register int number_to_move = yy_n_chars + 2;
93
-		register char *dest = &yy_current_buffer->yy_ch_buf[
94
+		int number_to_move = yy_n_chars + 2;
95
+		char *dest = &yy_current_buffer->yy_ch_buf[
96
 					yy_current_buffer->yy_buf_size + 2];
97
-		register char *source =
98
+		char *source =
99
 				&yy_current_buffer->yy_ch_buf[number_to_move];
100
 
101
 		while ( source > yy_current_buffer->yy_ch_buf )
102
@@ -10146,7 +10146,7 @@ yyconst char *s2;
103
 int n;
104
 #endif
105
 	{
106
-	register int i;
107
+	int i;
108
 	for ( i = 0; i < n; ++i )
109
 		s1[i] = s2[i];
110
 	}
111
@@ -10160,7 +10160,7 @@ static int yy_flex_strlen( s )
112
 yyconst char *s;
113
 #endif
114
 	{
115
-	register int n;
116
+	int n;
117
 	for ( n = 0; s[n]; ++n )
118
 		;
119
 
(-)files/patch-lex.yy__policy__backend__parser.cc (+87 lines)
Line 0 Link Here
1
--- policy/backend/lex.yy_policy_backend_parser.cc.orig	2018-07-10 15:46:56 UTC
2
+++ policy/backend/lex.yy_policy_backend_parser.cc
3
@@ -728,9 +728,9 @@ extern int yy_policy_backend_parserlex (
4
  */
5
 YY_DECL
6
 {
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
     
14
 #line 40 "backend.l"
15
 
16
@@ -779,7 +779,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				(yy_last_accepting_state) = yy_current_state;
25
@@ -1171,9 +1171,9 @@ case YY_STATE_EOF(STR):
26
  */
27
 static int yy_get_next_buffer (void)
28
 {
29
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
30
-	register char *source = (yytext_ptr);
31
-	register int number_to_move, i;
32
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
33
+	char *source = (yytext_ptr);
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
38
@@ -1297,14 +1297,14 @@ static int yy_get_next_buffer (void)
39
 
40
     static yy_state_type yy_get_previous_state (void)
41
 {
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
     
47
 	yy_current_state = (yy_start);
48
 
49
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			(yy_last_accepting_state) = yy_current_state;
56
@@ -1329,10 +1329,10 @@ static int yy_get_next_buffer (void)
57
  */
58
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
59
 {
60
-	register int yy_is_jam;
61
-    	register char *yy_cp = (yy_c_buf_p);
62
+	int yy_is_jam;
63
+    	char *yy_cp = (yy_c_buf_p);
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		(yy_last_accepting_state) = yy_current_state;
70
@@ -1933,7 +1933,7 @@ int yy_policy_backend_parserlex_destroy 
71
 #ifndef yytext_ptr
72
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
73
 {
74
-	register int i;
75
+	int i;
76
 	for ( i = 0; i < n; ++i )
77
 		s1[i] = s2[i];
78
 }
79
@@ -1942,7 +1942,7 @@ static void yy_flex_strncpy (char* s1, y
80
 #ifdef YY_NEED_STRLEN
81
 static int yy_flex_strlen (yyconst char * s )
82
 {
83
-	register int n;
84
+	int n;
85
 	for ( n = 0; s[n]; ++n )
86
 		;
87
 
(-)files/patch-lex.yy__policy__parser.cc (+87 lines)
Line 0 Link Here
1
--- policy/lex.yy_policy_parser.cc.orig	2018-07-12 13:40:14 UTC
2
+++ policy/lex.yy_policy_parser.cc
3
@@ -3092,9 +3092,9 @@ extern int yy_policy_parserlex (void);
4
  */
5
 YY_DECL
6
 {
7
-	register yy_state_type yy_current_state;
8
-	register char *yy_cp, *yy_bp;
9
-	register int yy_act;
10
+	yy_state_type yy_current_state;
11
+	char *yy_cp, *yy_bp;
12
+	int yy_act;
13
     
14
 #line 62 "policy.l"
15
 
16
@@ -3143,7 +3143,7 @@ YY_DECL
17
 yy_match:
18
 		do
19
 			{
20
-			register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
21
+			YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
22
 			if ( yy_accept[yy_current_state] )
23
 				{
24
 				(yy_last_accepting_state) = yy_current_state;
25
@@ -3667,9 +3667,9 @@ case YY_STATE_EOF(STR):
26
  */
27
 static int yy_get_next_buffer (void)
28
 {
29
-    	register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
30
-	register char *source = (yytext_ptr);
31
-	register int number_to_move, i;
32
+    	char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf;
33
+	char *source = (yytext_ptr);
34
+	int number_to_move, i;
35
 	int ret_val;
36
 
37
 	if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] )
38
@@ -3793,14 +3793,14 @@ static int yy_get_next_buffer (void)
39
 
40
     static yy_state_type yy_get_previous_state (void)
41
 {
42
-	register yy_state_type yy_current_state;
43
-	register char *yy_cp;
44
+	yy_state_type yy_current_state;
45
+	char *yy_cp;
46
     
47
 	yy_current_state = (yy_start);
48
 
49
 	for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp )
50
 		{
51
-		register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
52
+		YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1);
53
 		if ( yy_accept[yy_current_state] )
54
 			{
55
 			(yy_last_accepting_state) = yy_current_state;
56
@@ -3825,10 +3825,10 @@ static int yy_get_next_buffer (void)
57
  */
58
     static yy_state_type yy_try_NUL_trans  (yy_state_type yy_current_state )
59
 {
60
-	register int yy_is_jam;
61
-    	register char *yy_cp = (yy_c_buf_p);
62
+	int yy_is_jam;
63
+    	char *yy_cp = (yy_c_buf_p);
64
 
65
-	register YY_CHAR yy_c = 1;
66
+	YY_CHAR yy_c = 1;
67
 	if ( yy_accept[yy_current_state] )
68
 		{
69
 		(yy_last_accepting_state) = yy_current_state;
70
@@ -4429,7 +4429,7 @@ int yy_policy_parserlex_destroy  (void)
71
 #ifndef yytext_ptr
72
 static void yy_flex_strncpy (char* s1, yyconst char * s2, int n )
73
 {
74
-	register int i;
75
+	int i;
76
 	for ( i = 0; i < n; ++i )
77
 		s1[i] = s2[i];
78
 }
79
@@ -4438,7 +4438,7 @@ static void yy_flex_strncpy (char* s1, y
80
 #ifdef YY_NEED_STRLEN
81
 static int yy_flex_strlen (yyconst char * s )
82
 {
83
-	register int n;
84
+	int n;
85
 	for ( n = 0; s[n]; ++n )
86
 		;
87
 
(-)files/patch-libproto__packet.cc (-1 / +12 lines)
Lines 1-5 Link Here
1
--- libproto/packet.cc.orig	2012-01-11 17:56:10 UTC
1
--- libproto/packet.cc.orig	2018-07-10 12:55:07 UTC
2
+++ libproto/packet.cc
2
+++ libproto/packet.cc
3
@@ -88,8 +88,8 @@ IpHeader4::fragment(size_t mtu, list<vec
4
     //
5
     memcpy(&frag_buf[0], _data, IpHeader4::SIZE);
6
     {
7
-	register const u_char *cp;
8
-	register u_char *dp;
9
+	const u_char *cp;
10
+	u_char *dp;
11
 	int opt, optlen, cnt;
12
 
13
 	cp = (const u_char *)(orig_ip4.data() + orig_ip4.size());
3
@@ -233,7 +233,7 @@ IpHeader4Writer::compute_checksum()
14
@@ -233,7 +233,7 @@ IpHeader4Writer::compute_checksum()
4
 }
15
 }
5
 
16
 
(-)files/patch-netstream__access.h (+74 lines)
Line 0 Link Here
1
--- mrt/netstream_access.h.orig	2018-07-12 13:27:04 UTC
2
+++ mrt/netstream_access.h
3
@@ -120,7 +120,7 @@ do {									\
4
 
5
 #define GET_HOST_16(val, cp, rcvlen)					\
6
 do {									\
7
-	register uint16_t v_;						\
8
+	uint16_t v_;						\
9
 									\
10
 	if ((size_t)(rcvlen) < (size_t)2)				\
11
 		goto rcvlen_error;					\
12
@@ -132,7 +132,7 @@ do {									\
13
 
14
 #define PUT_HOST_16(val, cp, buflen)					\
15
 do {									\
16
-	register uint16_t v_;						\
17
+	uint16_t v_;						\
18
 									\
19
 	if ((size_t)(buflen) < (size_t)2)				\
20
 		goto buflen_error;					\
21
@@ -145,7 +145,7 @@ do {									\
22
 #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
23
 #define GET_NET_16(val, cp, rcvlen)					\
24
 do {									\
25
-	register uint16_t v_;						\
26
+	uint16_t v_;						\
27
 									\
28
 	if ((size_t)(rcvlen) < (size_t)2)				\
29
 		goto rcvlen_error;					\
30
@@ -156,7 +156,7 @@ do {									\
31
 } while (0)
32
 #define PUT_NET_16(val, cp, buflen)					\
33
 do {									\
34
-	register uint16_t v_;						\
35
+	uint16_t v_;						\
36
 									\
37
 	if ((size_t)(buflen) < (size_t)2)				\
38
 		goto buflen_error;					\
39
@@ -174,7 +174,7 @@ do {									\
40
 
41
 #define GET_HOST_32(val, cp, rcvlen)					\
42
 do {									\
43
-	register uint32_t v_;						\
44
+	uint32_t v_;						\
45
 									\
46
 	if ((size_t)(rcvlen) < (size_t)4)				\
47
 		goto rcvlen_error;					\
48
@@ -188,7 +188,7 @@ do {									\
49
 
50
 #define PUT_HOST_32(val, cp, buflen)					\
51
 do {									\
52
-	register uint32_t v_;						\
53
+	uint32_t v_;						\
54
 									\
55
 	if ((size_t)(buflen) < (size_t)4)				\
56
 		goto buflen_error;					\
57
@@ -203,7 +203,7 @@ do {									\
58
 #if defined(BYTE_ORDER) && (BYTE_ORDER == LITTLE_ENDIAN)
59
 #define GET_NET_32(val, cp, rcvlen)					\
60
 do {									\
61
-	register uint32_t v_;						\
62
+	uint32_t v_;						\
63
 									\
64
 	if ((size_t)(rcvlen) < (size_t)4)				\
65
 		goto rcvlen_error;					\
66
@@ -217,7 +217,7 @@ do {									\
67
 
68
 #define PUT_NET_32(val, cp, buflen)					\
69
 do {									\
70
-	register uint32_t v_;						\
71
+	uint32_t v_;						\
72
 									\
73
 	if ((size_t)(buflen) < (size_t)4)				\
74
 		goto buflen_error;					\
(-)files/patch-pathutil.c (+38 lines)
Line 0 Link Here
1
--- cli/libtecla/pathutil.c.orig	2018-07-10 13:09:21 UTC
2
+++ cli/libtecla/pathutil.c
3
@@ -168,7 +168,7 @@ char *_pn_append_to_path(PathName *path,
4
 /*
5
  * How many characters should be appended?
6
  */
7
-  if(slen < 0 || slen > strlen(string))
8
+  if(slen < 0 || (unsigned long)(slen) > strlen(string))
9
     slen = strlen(string);
10
 /*
11
  * Resize the pathname if needed.
12
@@ -239,7 +239,7 @@ char *_pn_prepend_to_path(PathName *path
13
 /*
14
  * How many characters should be appended?
15
  */
16
-  if(slen < 0 || slen > strlen(string))
17
+  if(slen < 0 || (unsigned long)(slen) > strlen(string))
18
     slen = strlen(string);
19
 /*
20
  * Work out how far we need to shift the original path string to make
21
@@ -494,7 +494,7 @@ char *_pu_start_of_path(const char *stri
22
 	break;
23
     };
24
   };
25
-  return (char *)string + i + 1;
26
+  return (char *)(string + i + 1);
27
 }
28
 
29
 /*.......................................................................
30
@@ -534,7 +534,7 @@ char *_pu_end_of_path(const char *string
31
       escaped = 1;
32
     };
33
   };
34
-  return (char *)string + i;
35
+  return (char *)(string + i);
36
 }
37
 
38
 /*.......................................................................
(-)files/patch-pcache.c (+38 lines)
Line 0 Link Here
1
--- cli/libtecla/pcache.c.orig	2018-07-11 18:23:55 UTC
2
+++ cli/libtecla/pcache.c
3
@@ -601,7 +601,7 @@ static int pca_extract_dir(PathCache *pc
4
  */
5
   {
6
     int dirlen = strlen(pc->path->name);
7
-    if(dirlen < FS_DIR_SEP_LEN ||
8
+    if((unsigned long)(dirlen) < FS_DIR_SEP_LEN ||
9
        strncmp(pc->path->name + dirlen - FS_DIR_SEP_LEN, FS_DIR_SEP,
10
 	       FS_DIR_SEP_LEN) != 0) {
11
       if(_pn_append_to_path(pc->path, FS_DIR_SEP, FS_DIR_SEP_LEN, 0) == NULL) {
12
@@ -1500,7 +1500,7 @@ static int cpa_cmd_contains_path(const c
13
  * If the filename starts with the root directory, then it obviously
14
  * starts with a pathname.
15
  */
16
-  if(prefix_len >= FS_ROOT_DIR_LEN && 
17
+  if((unsigned long)(prefix_len) >= FS_ROOT_DIR_LEN && 
18
      strncmp(prefix, FS_ROOT_DIR, FS_ROOT_DIR_LEN) == 0)
19
     return 1;
20
 /*
21
@@ -1509,7 +1509,7 @@ static int cpa_cmd_contains_path(const c
22
  * starts with a pathname specification (valid or otherwise).
23
  */
24
   for(i=0; i<prefix_len; i++) {
25
-    if(prefix_len - i >= FS_DIR_SEP_LEN &&
26
+    if((unsigned long)((prefix_len - i)) >= FS_DIR_SEP_LEN &&
27
        strncmp(prefix + i, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0)
28
       return 1;
29
   };
30
@@ -1653,7 +1653,7 @@ static int pca_expand_tilde(PathCache *p
31
  * skip over it so that it doesn't get copied into the output pathname
32
  */
33
   if(homedir && strcmp(homedir, FS_ROOT_DIR) == 0 &&
34
-     (pptr-path) + FS_DIR_SEP_LEN < pathlen &&
35
+     (pptr-path) + FS_DIR_SEP_LEN < (unsigned long)(pathlen) &&
36
      strncmp(pptr, FS_DIR_SEP, FS_DIR_SEP_LEN) == 0) {
37
     pptr += FS_DIR_SEP_LEN;
38
   };
(-)files/patch-popen.cc (+11 lines)
Line 0 Link Here
1
--- libxorp/popen.cc.orig	2018-07-10 12:54:42 UTC
2
+++ libxorp/popen.cc
3
@@ -424,7 +424,7 @@ popen2(const string& command, const list
4
 int
5
 pclose2(FILE *iop_out, bool dont_wait)
6
 {
7
-    register struct pid_s *cur, *last;
8
+    struct pid_s *cur, *last;
9
     int pstat = 0;
10
     pid_t pid = 0;
11
 
(-)files/patch-strptime.c (+15 lines)
Line 0 Link Here
1
--- libxorp/strptime.c.orig	2018-07-10 12:54:53 UTC
2
+++ libxorp/strptime.c
3
@@ -85,10 +85,10 @@
4
 #define TM_YEAR_BASE 1900
5
 #endif
6
 
7
-static inline void *
8
+static inline const char *
9
 UNCONST(const void *a)
10
 {
11
-	return ((const char *)a - (const char *)0) + (char *)0;
12
+	return ((const char *)a - sizeof((const char *)0)) + sizeof((char *)0);
13
 }
14
 
15
 
(-)files/patch-y.boot__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.boot_tab.cc.orig	2018-07-12 14:14:48 UTC
2
+++ rtrmgr/y.boot_tab.cc
3
@@ -474,9 +474,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/patch-y.opcmd__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.opcmd_tab.cc.orig	2018-07-12 14:13:19 UTC
2
+++ rtrmgr/y.opcmd_tab.cc
3
@@ -684,9 +684,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/patch-y.tplt__tab.cc (+14 lines)
Line 0 Link Here
1
--- rtrmgr/y.tplt_tab.cc.orig	2018-07-12 14:20:17 UTC
2
+++ rtrmgr/y.tplt_tab.cc
3
@@ -552,9 +552,9 @@ int
4
 yyparse (YYPARSE_PARAM_ARG)
5
     YYPARSE_PARAM_DECL
6
 {
7
-    register int yym, yyn, yystate;
8
+    int yym, yyn, yystate;
9
 #if YYDEBUG
10
-    register const char *yys;
11
+    const char *yys;
12
 
13
     if ((yys = getenv("YYDEBUG")))
14
     {
(-)files/xorp.in (-1 / +1 lines)
Lines 1-6 Link Here
1
#!/bin/sh
1
#!/bin/sh
2
#
2
#
3
# $FreeBSD$
3
# $FreeBSD: head/net/xorp/files/xorp.in 346231 2014-02-26 21:54:59Z antoine $
4
#
4
#
5
# A sample XORP startup script.
5
# A sample XORP startup script.
6
#
6
#

Return to bug 217152