patch 9.1.0041: xxd -i may generate incorrect C statements
Problem: xxd -i may generate incorrect C statements
(Kuratius)
Solution: xxd: Make size type returned by -i option compatible
with C standard by using type size_t instead of
unsigned int (Kuratius)
Also change affected tests to now correctly expect size_t's
fixes: #13876
closes: #13880
Signed-off-by: Kuratius <Kuratius@gmx.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/testdir/test_xxd.vim b/src/testdir/test_xxd.vim
index 7a2771e..a3f006b 100644
--- a/src/testdir/test_xxd.vim
+++ b/src/testdir/test_xxd.vim
@@ -103,7 +103,7 @@
unsigned char XXDfile[] = {
0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
};
- unsigned int XXDfile_len = 11;
+ size_t XXDfile_len = 11;
[CODE]
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
@@ -119,7 +119,7 @@
unsigned char XXDFILE[] = {
0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
};
- unsigned int XXDFILE_LEN = 11;
+ size_t XXDFILE_LEN = 11;
[CODE]
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
endfor
@@ -233,7 +233,7 @@
unsigned char varName[] = {
0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
};
- unsigned int varName_len = 11;
+ size_t varName_len = 11;
[CODE]
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
@@ -247,7 +247,7 @@
unsigned char StdIn[] = {
0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
};
- unsigned int StdIn_len = 11;
+ size_t StdIn_len = 11;
[CODE]
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
@@ -263,7 +263,7 @@
unsigned char VARNAME[] = {
0x54, 0x45, 0x53, 0x54, 0x61, 0x62, 0x63, 0x64, 0x30, 0x39, 0x0a
};
- unsigned int VARNAME_LEN = 11;
+ size_t VARNAME_LEN = 11;
[CODE]
call assert_equal(expected, getline(1,'$'), s:Mess(s:test))
endfor