summaryrefslogtreecommitdiff
path: root/src/vim9execute.c
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2020-03-23 22:53:22 +0100
committerBram Moolenaar <Bram@vim.org>2020-03-23 22:53:22 +0100
commit1082772f4c29bceebf5eb06f7e1f01bd143a2131 (patch)
tree8f20c24e43f9c06e08b366eaef0976b34f902ab1 /src/vim9execute.c
parentd7b7770f11c16cfac707b5048c61e722dcc903a6 (diff)
downloadvim-git-1082772f4c29bceebf5eb06f7e1f01bd143a2131.tar.gz
patch 8.2.0439: :disassemble has minor flawsv8.2.0439
Problem: :disassemble has minor flaws. Solution: Format the code. Use (int) instead of (char) for %c. (also by James McCoy, closes #5831)
Diffstat (limited to 'src/vim9execute.c')
-rw-r--r--src/vim9execute.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/src/vim9execute.c b/src/vim9execute.c
index a5b707492..5f6f79a15 100644
--- a/src/vim9execute.c
+++ b/src/vim9execute.c
@@ -1774,14 +1774,16 @@ ex_disassemble(exarg_T *eap)
}
break;
case ISN_EXECUTE:
- smsg("%4d EXECUTE %lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d EXECUTE %lld", current,
+ (long long)(iptr->isn_arg.number));
break;
case ISN_LOAD:
if (iptr->isn_arg.number < 0)
smsg("%4d LOAD arg[%lld]", current,
- (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
+ (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
else
- smsg("%4d LOAD $%lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d LOAD $%lld", current,
+ (long long)(iptr->isn_arg.number));
break;
case ISN_LOADV:
smsg("%4d LOADV v:%s", current,
@@ -1817,15 +1819,16 @@ ex_disassemble(exarg_T *eap)
smsg("%4d LOADENV %s", current, iptr->isn_arg.string);
break;
case ISN_LOADREG:
- smsg("%4d LOADREG @%c", current, (char)(iptr->isn_arg.number));
+ smsg("%4d LOADREG @%c", current, (int)(iptr->isn_arg.number));
break;
case ISN_STORE:
if (iptr->isn_arg.number < 0)
smsg("%4d STORE arg[%lld]", current,
- (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
+ (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
else
- smsg("%4d STORE $%lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d STORE $%lld", current,
+ (long long)(iptr->isn_arg.number));
break;
case ISN_STOREV:
smsg("%4d STOREV v:%s", current,
@@ -1862,7 +1865,7 @@ ex_disassemble(exarg_T *eap)
smsg("%4d STOREENV $%s", current, iptr->isn_arg.string);
break;
case ISN_STOREREG:
- smsg("%4d STOREREG @%c", current, (char)iptr->isn_arg.number);
+ smsg("%4d STOREREG @%c", current, (int)iptr->isn_arg.number);
break;
case ISN_STORENR:
smsg("%4d STORE %lld in $%d", current,
@@ -1872,7 +1875,8 @@ ex_disassemble(exarg_T *eap)
// constants
case ISN_PUSHNR:
- smsg("%4d PUSHNR %lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d PUSHNR %lld", current,
+ (long long)(iptr->isn_arg.number));
break;
case ISN_PUSHBOOL:
case ISN_PUSHSPEC:
@@ -1941,10 +1945,12 @@ ex_disassemble(exarg_T *eap)
smsg("%4d PUSH v:exception", current);
break;
case ISN_NEWLIST:
- smsg("%4d NEWLIST size %lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d NEWLIST size %lld", current,
+ (long long)(iptr->isn_arg.number));
break;
case ISN_NEWDICT:
- smsg("%4d NEWDICT size %lld", current, (long long)(iptr->isn_arg.number));
+ smsg("%4d NEWDICT size %lld", current,
+ (long long)(iptr->isn_arg.number));
break;
// function call