summaryrefslogtreecommitdiff
path: root/data/vim/patches/8.1.1271
blob: be4c38badfdb6170accbc98112388a72f41c2a1b (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
To: vim_dev@googlegroups.com
Subject: Patch 8.1.1271
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.1271 (after 8.1.1270)
Problem:    Compiler warnings for use of STRNCPY(). (John Marriott)
Solution:   Use mch_memmove() instead of STRNCPY().
Files:	    src/search.c


*** ../vim-8.1.1270/src/search.c	2019-05-04 21:08:17.119814244 +0200
--- src/search.c	2019-05-05 12:59:29.260505205 +0200
***************
*** 1415,1424 ****
  		{
  		    // Use a space to draw the composing char on.
  		    msgbuf[1] = ' ';
! 		    STRNCPY(msgbuf + 2, p, STRLEN(p));
  		}
  		else
! 		    STRNCPY(msgbuf + 1, p, STRLEN(p));
  		if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
  		{
  		    p = msgbuf + STRLEN(p) + 1;
--- 1415,1424 ----
  		{
  		    // Use a space to draw the composing char on.
  		    msgbuf[1] = ' ';
! 		    mch_memmove(msgbuf + 2, p, STRLEN(p));
  		}
  		else
! 		    mch_memmove(msgbuf + 1, p, STRLEN(p));
  		if (spats[0].off.line || spats[0].off.end || spats[0].off.off)
  		{
  		    p = msgbuf + STRLEN(p) + 1;
***************
*** 5006,5012 ****
  	    else
  		vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
  	}
! 	STRNCPY(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
  	if (dirc == '?' && cur == 100)
  	    cur = -1;
  
--- 5006,5012 ----
  	    else
  		vim_snprintf(t, STAT_BUF_LEN, "[%d/%d]", cur, cnt);
  	}
! 	mch_memmove(msgbuf + STRLEN(msgbuf) - STRLEN(t), t, STRLEN(t));
  	if (dirc == '?' && cur == 100)
  	    cur = -1;
  
*** ../vim-8.1.1270/src/version.c	2019-05-04 21:08:17.119814244 +0200
--- src/version.c	2019-05-05 13:00:50.092066257 +0200
***************
*** 769,770 ****
--- 769,772 ----
  {   /* Add new patch number below this line */
+ /**/
+     1271,
  /**/

-- 
VOICE OVER: As the horrendous Black Beast lunged forward, escape for Arthur
            and his knights seemed hopeless,  when, suddenly ... the animator
            suffered a fatal heart attack.
ANIMATOR:   Aaaaagh!
VOICE OVER: The cartoon peril was no more ... The Quest for Holy Grail could
            continue.
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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    ///