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

Collapse All | Expand All

(-)files/patch-SConstruct (-3 / +17 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
@@ -877,9 +868,10 @@ env.AppendUnique(CFLAGS = [
29
     '-Wcast-align',
29
     '-Wcast-qual',
30
     '-Wmissing-declarations',
31
     '-Wpointer-arith',
32
-    '-Wcast-align',
30
     '-Wstrict-prototypes',
33
     '-Wstrict-prototypes',
31
     '-Wnested-externs',
34
     '-Wnested-externs',
32
+    '-Wno-unused-function',
35
+    '-Wno-unused-function',
36
+    '-Wno-unused-parameter',
33
     '-pipe',
37
     '-pipe',
34
     ])
38
     ])
35
 
39
 
40
@@ -889,9 +881,7 @@ env.AppendUnique(CXXFLAGS = [
41
     '-Wwrite-strings',
42
     '-Wcast-qual',
43
     '-Wpointer-arith',
44
-    '-Wcast-align',
45
     '-Woverloaded-virtual',
46
-    '-ftemplate-depth-25',
47
     '-pipe',
48
     ])
49
 
(-)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-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.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-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-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/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