Commit Graph

5486 Commits

Author SHA1 Message Date
ZyX
77776b09c6 eval/encode: Fix writing strings starting with NL to list
Error [found][1] by oni-link.

[1]: https://github.com/neovim/neovim/pull/4131/files#r52239384
2016-04-18 02:47:13 +03:00
ZyX
c27395ddc8 eval: Fix QuickBuild failures
Compiler used by one VM in QuickBuild has found a number of false positives.
Everything is fine on travis.

List of failures:

From [QuickBuild][1], build [7429][2]:

    14:38:19,945 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘assert_bool’:
    14:38:19,945 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:7551:40: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
    14:38:20,058 WARN  - cc1: all warnings being treated as errors

. This is not making much sense (7551:40 is `!=` in `{SpecialVarValue} !=
({bool}?{SpecialVarValue}:{SpecialVarValue})`), but this error is present.

---

Also fail from [build][3] [4930][4]:

    15:47:00,853 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c: In function ‘encode_read_from_list’:
    15:47:00,853 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval/encode.c:258:30: error: conversion to ‘char’ from ‘int’ may alter its value [-Werror=conversion]

, pointing to `:` in `{char} = ({char} == {const} ? {const} : {char})` where
`{const}` is character constant like `'\n'`. I have no idea where exactly it saw
conversion, so simply casted everything to (char).

---

[Build][5] error:

    08:32:03,472 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘tv_equal’:
    08:32:03,472 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:5077:1: error: control reaches end of non-void function [-Werror=return-type]

---

Build [4949][7]:

    11:28:00,578 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_type’:
    11:28:00,578 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:16085:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized]
    11:28:00,581 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c: In function ‘f_empty’:
    11:28:00,581 WARN  - /home/quickbuild/buildagent/workspace/root/neovim/pull-requests-automated/src/nvim/eval.c:8505:24: error: ‘n’ may be used uninitialized in this function [-Werror=uninitialized]

[1]: http://neovim-qb.szakmeister.net/wicket/page?5-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-2-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink
[2]: http://neovim-qb.szakmeister.net/build/4929
[3]: http://neovim-qb.szakmeister.net/build/4930
[4]: http://neovim-qb.szakmeister.net/wicket/page?1-1.ILinkListener-content-buildTab-panel-masterStep-body-children-0-step-body-children-1-body-children-3-step-body-children-0-step-body-children-0-step-head-logLink
[5]: http://neovim-qb.szakmeister.net/build/4948/step_status
[7]: http://neovim-qb.szakmeister.net/build/4949
2016-04-18 02:47:13 +03:00
ZyX
fa26eee85b version: Record that vim-7.4.1271 is kinda of there 2016-04-18 02:46:55 +03:00
ZyX
569e404622 eval/encode: Fix non-utf-8 &encoding handling, add tests 2016-04-18 02:46:34 +03:00
ZyX
7124329bd9 *: Fix memory leaks found by clang sanitizer 2016-04-18 02:46:34 +03:00
ZyX
d4106f6df3 shada: Make sure that NIL and EXT values can also be parsed back
Note: currently they are both *dumped*, but parsing them produces an error. This
is inappropriate: variables should either be skipped with error message when
dumping or should be read back properly.

It also appears that I did not have test for “has wrong variable value type”
error, so nothing got removed from errors_spec.
2016-04-18 02:46:34 +03:00
ZyX
0aa3e7b7ce eval: Port parts of 7.4.1267 that are not already present 2016-04-18 02:46:34 +03:00
ZyX
b7cb8f0597 eval: Make assert_true and assert_false accept v:true and v:false 2016-04-18 02:45:49 +03:00
ZyX
c91c0171dd *: Fix gcc warnings 2016-04-18 02:45:49 +03:00
ZyX
6cdf45e298 eval: Change dv_lock type to VarLockStatus 2016-04-18 02:45:49 +03:00
ZyX
f4ea114c67 eval/decode: Fix vim_str2nr invocation 2016-04-18 02:45:49 +03:00
ZyX
33778c36cc *: Fix linter errors 2016-04-18 02:45:49 +03:00
ZyX
6167ce6df2 eval: Remove v:none
To get v:none back just rever this commit. This will not make json*() functions
compatible with Vim though.
2016-04-18 02:45:49 +03:00
ZyX
a3b87fc19b eval: Remove get_vim_var_tv function 2016-04-18 02:45:49 +03:00
ZyX
e303ea8a19 eval/decode: Add support for special maps
Special dictionaries representing map are created when encountering duplicate
key or when key is empty or contains NUL.

Also checks that values are separated by a comma/colon properly.
2016-04-18 02:45:49 +03:00
ZyX
2c378fdfaf eval/decode: Parse strings with NUL to special dictionaries 2016-04-18 02:45:49 +03:00
ZyX
634e51d12b eval/*: Fix some linter errors 2016-04-18 02:45:49 +03:00
ZyX
57700def79 doc: Update documentation regarding converting from/to &encoding 2016-04-18 02:45:49 +03:00
ZyX
5814e29cdb eval/decode: Fix surrogate pairs processing 2016-04-18 02:45:49 +03:00
ZyX
ea82270d30 eval/decode: Fail on control and invalid unicode characters 2016-04-18 02:45:49 +03:00
ZyX
cddd7d47c3 eval/decode: Make msgpackparse() function use new v: vars 2016-04-18 02:45:49 +03:00
ZyX
ed6756563c eval/decode: Replace INIT_SPECIAL_DICT macros with inline function 2016-04-18 02:45:49 +03:00
ZyX
700b32a2b3 eval: Move some decoding functions to eval/decode.c 2016-04-18 02:45:49 +03:00
ZyX
3c39219550 eval: Get rid of VV_LEN constant 2016-04-18 02:45:49 +03:00
ZyX
85244e68e3 vim: Move *MSG* macros to message.h
Note: OUT* macros were removed because they are no longer used anywhere.
2016-04-18 02:45:49 +03:00
ZyX
41b44d114c eval: Move encode.c to eval/encode.c 2016-04-18 02:45:49 +03:00
ZyX
704accfbfa cmake: Refactor code that creates directories and lists C files 2016-04-18 02:45:49 +03:00
ZyX
e213ba1506 eval: Add jsondecode() function 2016-04-18 02:45:49 +03:00
ZyX
0f0e2bdfd4 encode: Do not use default case for v_type 2016-04-18 02:44:03 +03:00
ZyX
f5c35ba109 functests/msgpack: Test dumping special nil and bool dicts 2016-04-18 02:44:03 +03:00
ZyX
6e5498c3e3 runtime/msgpack: Add support for special values 2016-04-18 02:44:03 +03:00
ZyX
d70a322c40 eval: Add special variables v:false, v:null, v:none 2016-04-18 02:44:03 +03:00
ZyX
18903bd9b8 eval: Add special variable type 2016-04-18 02:44:03 +03:00
ZyX
256a5d2522 encode: Add a hint for static analyzer that cur_tv is not NULL 2016-04-18 02:44:03 +03:00
ZyX
68e58444b4 eval: Add jsonencode() function
Ref #3471
2016-04-18 02:44:03 +03:00
ZyX
c3efad5398 functests(msgpack): Fix location of one of the tests 2016-04-18 02:44:03 +03:00
ZyX
f21cb425fb functests(msgpack): Fix test names 2016-04-18 02:44:03 +03:00
ZyX
44cbf45d26 eval: Split out typval_T dumping functions to nvim/encode.c 2016-04-18 02:44:03 +03:00
Justin M. Keyes
83c683f5e1 Merge pull request #4565 from KillTheMule/vim-patch-1282
vim-patch:7.4.{1000, 1001, 1030, 1282, 1284}
2016-04-17 19:19:06 -04:00
Justin M. Keyes
aae7e8b7dd Merge pull request #4585 from dbarnett/vim-fc39ec
vim-patch:fc39ec
2016-04-17 18:44:25 -04:00
Justin M. Keyes
cc1beecf81 Merge pull request #4592 from oni-link/fix.issue.4582
eval.c: Fix heap corruption error when constructing sourcing_name
2016-04-17 18:25:43 -04:00
oni-link
164bcaf5c9 eval.c: Fix heap corruption error when constructing sourcing_name
A wrong format specifier and not enough allocated memory for
sourcing_name could lead to a heap corruption.

Original patch by Rui Abreu Ferreira (@equalsraf)

Fixes #4582
2016-04-17 23:31:47 +02:00
Justin M. Keyes
4043725991 Merge pull request #4574 from oni-link/fix.utfc_ptr2char_len
mbyte.c: Fix invalid memory access in utfc_ptr2char_len
2016-04-17 16:59:14 -04:00
Justin M. Keyes
e90f52f7ac Merge pull request #4586 from oni-link/fix.on.process.exit
eval.c: Fix cut off of terminal exit message
2016-04-17 15:22:05 -04:00
oni-link
cd00aa6ae4 mbyte_spec.lua: Fix indentation 2016-04-17 21:07:42 +02:00
oni-link
a8fec15899 mbyte_spec.lua: Fix wording 2016-04-17 21:07:22 +02:00
Justin M. Keyes
4b097c85d8 Merge pull request #4579 from Shougo/lemonade
Add lemonade support for clipboard feature
2016-04-17 14:50:24 -04:00
oni-link
2eb5d73438 eval.c: Fix cut off of terminal exit message
The message array in on_process_exit() is too short
for a status > 99.
2016-04-17 11:09:55 +02:00
David Barnett
2895883154 vim-patch:fc39ec
Update runtime files.

fc39ecf8de
2016-04-16 23:06:24 -07:00
Shougo Matsushita
b50afb4651 clipboard: support "lemonade" tool 2016-04-17 13:38:57 +09:00