summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.0944
blob: b3676b76ff89a70b784d7413aa0ca8d54d05aa97 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
To: vim_dev@googlegroups.com
Subject: Patch 8.1.0944
Fcc: outbox
From: Bram Moolenaar <Bram@moolenaar.net>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
------------

Patch 8.1.0944
Problem:    Format of nbdbg() arguments is not checked.
Solution:   Add format attribute.  Fix reported problems. (Dominique Pelle,
            closes #3992)
Files:	    src/nbdebug.h, src/netbeans.c


*** ../vim-8.1.0943/src/nbdebug.h	2016-08-29 22:42:20.000000000 +0200
--- src/nbdebug.h	2019-02-17 19:10:08.447050070 +0100
***************
*** 42,48 ****
  } WtWait;
  
  
! void		 nbdbg(char *, ...);
  
  void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
  void nbdebug_log_init(char *log_var, char *level_var);
--- 42,52 ----
  } WtWait;
  
  
! void		 nbdbg(char *, ...)
! #ifdef USE_PRINTF_FORMAT_ATTRIBUTE
!    __attribute__((format(printf, 1, 2)))
! #endif
! ;
  
  void nbdebug_wait(u_int wait_flags, char *wait_var, u_int wait_secs);
  void nbdebug_log_init(char *log_var, char *level_var);
*** ../vim-8.1.0943/src/netbeans.c	2019-02-17 17:44:36.215875493 +0100
--- src/netbeans.c	2019-02-17 19:10:08.451050047 +0100
***************
*** 934,940 ****
      {
  	mch_memmove(newtext, oldtext, first);
  	STRMOVE(newtext + first, oldtext + lastbyte + 1);
! 	nbdebug(("    NEW LINE %d: %s\n", lnum, newtext));
  	ml_replace(lnum, newtext, FALSE);
      }
  }
--- 934,940 ----
      {
  	mch_memmove(newtext, oldtext, first);
  	STRMOVE(newtext + first, oldtext + lastbyte + 1);
! 	nbdebug(("    NEW LINE %ld: %s\n", lnum, newtext));
  	ml_replace(lnum, newtext, FALSE);
      }
  }
***************
*** 1166,1172 ****
  		    return FAIL;
  		}
  		first = *pos;
! 		nbdebug(("    FIRST POS: line %d, col %d\n",
  						      first.lnum, first.col));
  		pos = off2pos(buf->bufp, off+count-1);
  		if (!pos)
--- 1166,1172 ----
  		    return FAIL;
  		}
  		first = *pos;
! 		nbdebug(("    FIRST POS: line %ld, col %d\n",
  						      first.lnum, first.col));
  		pos = off2pos(buf->bufp, off+count-1);
  		if (!pos)
***************
*** 1178,1184 ****
  		    return FAIL;
  		}
  		last = *pos;
! 		nbdebug(("    LAST POS: line %d, col %d\n",
  							last.lnum, last.col));
  		del_from_lnum = first.lnum;
  		del_to_lnum = last.lnum;
--- 1178,1184 ----
  		    return FAIL;
  		}
  		last = *pos;
! 		nbdebug(("    LAST POS: line %ld, col %d\n",
  							last.lnum, last.col));
  		del_from_lnum = first.lnum;
  		del_to_lnum = last.lnum;
***************
*** 1264,1270 ****
  			}
  		    }
  
! 		    nbdebug(("    Deleting lines %d through %d\n",
  						 del_from_lnum, del_to_lnum));
  		    curwin->w_cursor.lnum = del_from_lnum;
  		    curwin->w_cursor.col = 0;
--- 1264,1270 ----
  			}
  		    }
  
! 		    nbdebug(("    Deleting lines %ld through %ld\n",
  						 del_from_lnum, del_to_lnum));
  		    curwin->w_cursor.lnum = del_from_lnum;
  		    curwin->w_cursor.col = 0;
***************
*** 1540,1546 ****
  	    {
  		if (!buf->bufp->b_netbeans_file)
  		{
! 		    nbdebug(("E658: NetBeans connection lost for buffer %ld\n", buf->bufp->b_fnum));
  		    semsg(_("E658: NetBeans connection lost for buffer %d"),
  							   buf->bufp->b_fnum);
  		}
--- 1540,1546 ----
  	    {
  		if (!buf->bufp->b_netbeans_file)
  		{
! 		    nbdebug(("E658: NetBeans connection lost for buffer %d\n", buf->bufp->b_fnum));
  		    semsg(_("E658: NetBeans connection lost for buffer %d"),
  							   buf->bufp->b_fnum);
  		}
*** ../vim-8.1.0943/src/version.c	2019-02-17 18:59:07.114686682 +0100
--- src/version.c	2019-02-17 19:10:31.334922632 +0100
***************
*** 781,782 ****
--- 781,784 ----
  {   /* Add new patch number below this line */
+ /**/
+     944,
  /**/

-- 
Your company is doomed if your primary product is overhead transparencies.
				(Scott Adams - The Dilbert principle)

 /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///