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

5 views
Skip to first unread message

mattn

unread,
Apr 2, 2026, 1:24:55 PM (13 hours ago) Apr 2
to vim/vim, Subscribed

Follow-up to patch 9.2.0283. Remove remaining (int) casts before alloc() in vim9script.c and netbeans.c.

  • vim9script.c (3 locations): lengths derived from STRLEN() on file paths, bounded by PATH_MAX. The (int) cast is unnecessary but not a security issue in practice.
  • netbeans.c (1 location): all operands (oldlen, lastbyte, first) are already int/colnr_T (= int), so the (int) cast is purely redundant — no truncation can occur here.

Relates to #19888


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

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

Commit Summary

  • 7058cb4 Remove more unnecessary (int) casts before alloc() calls

File Changes

(2 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/19893@github.com>

mattn

unread,
Apr 2, 2026, 8:15:45 PM (6 hours ago) Apr 2
to vim/vim, Push

@mattn pushed 1 commit.

  • 80af291 Merge branch 'master' into fix-int-cast-truncation-2


View it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/pull/19893/before/7058cb4069fa1d3c69e6acbd95cc60b8f1c63261/after/80af291079c26f998770f207e85110f6e64e613b@github.com>

Reply all
Reply to author
Forward
0 new messages