comparison src/vim9execute.c @ 19760:9daed26b788b v8.2.0436

patch 8.2.0436: no warnings for incorrect printf arguments Commit: https://github.com/vim/vim/commit/db99f9f29a248b84742b6779c3343123f72065e7 Author: Bram Moolenaar <Bram@vim.org> Date: Mon Mar 23 22:12:22 2020 +0100 patch 8.2.0436: no warnings for incorrect printf arguments Problem: No warnings for incorrect printf arguments. Solution: Fix attribute in declaration. Fix uncovered mistakes. (Dominique Pelle, closes #5834)
author Bram Moolenaar <Bram@vim.org>
date Mon, 23 Mar 2020 22:15:05 +0100
parents 4174c4da6ff7
children aa4cbdb676cd
comparison
equal deleted inserted replaced
19759:321ee36ae10c 19760:9daed26b788b
1772 echo->echo_with_white ? "ECHO" : "ECHON", 1772 echo->echo_with_white ? "ECHO" : "ECHON",
1773 echo->echo_count); 1773 echo->echo_count);
1774 } 1774 }
1775 break; 1775 break;
1776 case ISN_EXECUTE: 1776 case ISN_EXECUTE:
1777 smsg("%4d EXECUTE %d", current, iptr->isn_arg.number); 1777 smsg("%4d EXECUTE %lld", current, (long long)(iptr->isn_arg.number));
1778 break; 1778 break;
1779 case ISN_LOAD: 1779 case ISN_LOAD:
1780 if (iptr->isn_arg.number < 0) 1780 if (iptr->isn_arg.number < 0)
1781 smsg("%4d LOAD arg[%lld]", current, 1781 smsg("%4d LOAD arg[%lld]", current,
1782 iptr->isn_arg.number + STACK_FRAME_SIZE); 1782 (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
1783 else 1783 else
1784 smsg("%4d LOAD $%lld", current, iptr->isn_arg.number); 1784 smsg("%4d LOAD $%lld", current, (long long)(iptr->isn_arg.number));
1785 break; 1785 break;
1786 case ISN_LOADV: 1786 case ISN_LOADV:
1787 smsg("%4d LOADV v:%s", current, 1787 smsg("%4d LOADV v:%s", current,
1788 get_vim_var_name(iptr->isn_arg.number)); 1788 get_vim_var_name(iptr->isn_arg.number));
1789 break; 1789 break;
1815 break; 1815 break;
1816 case ISN_LOADENV: 1816 case ISN_LOADENV:
1817 smsg("%4d LOADENV %s", current, iptr->isn_arg.string); 1817 smsg("%4d LOADENV %s", current, iptr->isn_arg.string);
1818 break; 1818 break;
1819 case ISN_LOADREG: 1819 case ISN_LOADREG:
1820 smsg("%4d LOADREG @%c", current, iptr->isn_arg.number); 1820 smsg("%4d LOADREG @%c", current, (char)(iptr->isn_arg.number));
1821 break; 1821 break;
1822 1822
1823 case ISN_STORE: 1823 case ISN_STORE:
1824 if (iptr->isn_arg.number < 0) 1824 if (iptr->isn_arg.number < 0)
1825 smsg("%4d STORE arg[%lld]", current, 1825 smsg("%4d STORE arg[%lld]", current,
1826 iptr->isn_arg.number + STACK_FRAME_SIZE); 1826 (long long)(iptr->isn_arg.number + STACK_FRAME_SIZE));
1827 else 1827 else
1828 smsg("%4d STORE $%lld", current, iptr->isn_arg.number); 1828 smsg("%4d STORE $%lld", current, (long long)(iptr->isn_arg.number));
1829 break; 1829 break;
1830 case ISN_STOREV: 1830 case ISN_STOREV:
1831 smsg("%4d STOREV v:%s", current, 1831 smsg("%4d STOREV v:%s", current,
1832 get_vim_var_name(iptr->isn_arg.number)); 1832 get_vim_var_name(iptr->isn_arg.number));
1833 break; 1833 break;
1860 break; 1860 break;
1861 case ISN_STOREENV: 1861 case ISN_STOREENV:
1862 smsg("%4d STOREENV $%s", current, iptr->isn_arg.string); 1862 smsg("%4d STOREENV $%s", current, iptr->isn_arg.string);
1863 break; 1863 break;
1864 case ISN_STOREREG: 1864 case ISN_STOREREG:
1865 smsg("%4d STOREREG @%c", current, iptr->isn_arg.number); 1865 smsg("%4d STOREREG @%c", current, (char)iptr->isn_arg.number);
1866 break; 1866 break;
1867 case ISN_STORENR: 1867 case ISN_STORENR:
1868 smsg("%4d STORE %lld in $%d", current, 1868 smsg("%4d STORE %lld in $%d", current,
1869 iptr->isn_arg.storenr.stnr_val, 1869 iptr->isn_arg.storenr.stnr_val,
1870 iptr->isn_arg.storenr.stnr_idx); 1870 iptr->isn_arg.storenr.stnr_idx);
1871 break; 1871 break;
1872 1872
1873 // constants 1873 // constants
1874 case ISN_PUSHNR: 1874 case ISN_PUSHNR:
1875 smsg("%4d PUSHNR %lld", current, iptr->isn_arg.number); 1875 smsg("%4d PUSHNR %lld", current, (long long)(iptr->isn_arg.number));
1876 break; 1876 break;
1877 case ISN_PUSHBOOL: 1877 case ISN_PUSHBOOL:
1878 case ISN_PUSHSPEC: 1878 case ISN_PUSHSPEC:
1879 smsg("%4d PUSH %s", current, 1879 smsg("%4d PUSH %s", current,
1880 get_var_special_name(iptr->isn_arg.number)); 1880 get_var_special_name(iptr->isn_arg.number));
1939 break; 1939 break;
1940 case ISN_PUSHEXC: 1940 case ISN_PUSHEXC:
1941 smsg("%4d PUSH v:exception", current); 1941 smsg("%4d PUSH v:exception", current);
1942 break; 1942 break;
1943 case ISN_NEWLIST: 1943 case ISN_NEWLIST:
1944 smsg("%4d NEWLIST size %lld", current, iptr->isn_arg.number); 1944 smsg("%4d NEWLIST size %lld", current, (long long)(iptr->isn_arg.number));
1945 break; 1945 break;
1946 case ISN_NEWDICT: 1946 case ISN_NEWDICT:
1947 smsg("%4d NEWDICT size %lld", current, iptr->isn_arg.number); 1947 smsg("%4d NEWDICT size %lld", current, (long long)(iptr->isn_arg.number));
1948 break; 1948 break;
1949 1949
1950 // function call 1950 // function call
1951 case ISN_BCALL: 1951 case ISN_BCALL:
1952 { 1952 {
2151 case ISN_2BOOL: if (iptr->isn_arg.number) 2151 case ISN_2BOOL: if (iptr->isn_arg.number)
2152 smsg("%4d INVERT (!val)", current); 2152 smsg("%4d INVERT (!val)", current);
2153 else 2153 else
2154 smsg("%4d 2BOOL (!!val)", current); 2154 smsg("%4d 2BOOL (!!val)", current);
2155 break; 2155 break;
2156 case ISN_2STRING: smsg("%4d 2STRING stack[%d]", current, 2156 case ISN_2STRING: smsg("%4d 2STRING stack[%lld]", current,
2157 iptr->isn_arg.number); 2157 (long long)(iptr->isn_arg.number));
2158 break; 2158 break;
2159 2159
2160 case ISN_DROP: smsg("%4d DROP", current); break; 2160 case ISN_DROP: smsg("%4d DROP", current); break;
2161 } 2161 }
2162 } 2162 }