[vim/vim] Remove unnecessary (int) casts before alloc() calls (PR #19889)

4 views
Skip to first unread message

mattn

unread,
Apr 2, 2026, 2:15:06 AM (24 hours ago) Apr 2
to vim/vim, Subscribed

alloc() already accepts size_t, so (int) casts on size_t values are redundant and could theoretically cause truncation on values > INT_MAX. Remove the casts and change alloc_cmdbuff() and list_alloc_with_items() signatures from int to size_t to match.

Closes #19888


You can view, comment on, or merge this pull request online at:

  https://github.com/vim/vim/pull/19889

Commit Summary

  • cac9a3e Remove unnecessary (int) casts before alloc() calls

File Changes

(8 files)

Patch Links:


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19889@github.com>

mattn

unread,
Apr 2, 2026, 2:18:15 AM (24 hours ago) Apr 2
to vim/vim, Push

@mattn pushed 1 commit.

  • c9aad43 Remove unnecessary (int) casts before alloc() calls


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19889/before/cac9a3e805c5ecbcc8e6089602496868c1fd89db/after/c9aad4386ee320f386e230891fe20942f20106dd@github.com>

Christian Brabandt

unread,
Apr 2, 2026, 12:58:57 PM (13 hours ago) Apr 2
to vim/vim, Subscribed

Closed #19889 via 964b7b5.


Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19889/issue_event/24155022545@github.com>

Reply all
Reply to author
Forward
0 new messages