Skip to content

erts: Fix tty_tinfo_make_map function arguments#10895

Merged
frazze-jobb merged 1 commit intoerlang:masterfrom
joaohf:fix-term-variables-imcompatible-pointer
Apr 2, 2026
Merged

erts: Fix tty_tinfo_make_map function arguments#10895
frazze-jobb merged 1 commit intoerlang:masterfrom
joaohf:fix-term-variables-imcompatible-pointer

Conversation

@joaohf
Copy link
Copy Markdown
Contributor

@joaohf joaohf commented Mar 23, 2026

According to [1], term_variables: bool*, num*, std* are NCURSES_CONST char * const. Where NCURSES_CONST is defined by ncurses configuration scripts [2].

1: https://man7.org/linux/man-pages/man3/term_variables.3x.html
2: https://github.com/mirror/ncurses/blob/master/configure.in#L1228


Without this fix gcc 15.2 is saying:

nifs/common/prim_tty_nif.c: In function ‘tty_tinfo_nif’:                                                                                                                                                                                   
nifs/common/prim_tty_nif.c:820:33: error: passing argument 2 of ‘tty_tinfo_make_map’ from incompatible pointer type [-Wincompatible-pointer-types]                                                                                         
  820 |         tty_tinfo_make_map(env, boolnames, boolcodes, boolfnames),
      |                                ^~~~~~~~~
      |                                 |
      |                                 char * const*
nifs/common/prim_tty_nif.c:789:60: note: expected ‘const char * const*’ but argument is of type ‘char * const*’
  789 |                                        const char * const* names,
      | ~~~~~~~~~~~~~~~~~~~~^~~~~
nifs/common/prim_tty_nif.c:820:44: error: passing argument 3 of ‘tty_tinfo_make_map’ from incompatible pointer type [-Wincompatible-pointer-types]
  820 |         tty_tinfo_make_map(env, boolnames, boolcodes, boolfnames),
      |                                            ^~~~~~~~~
      |                                             |
      |                                            char * const*

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Mar 23, 2026

CT Test Results

    3 files    136 suites   50m 5s ⏱️
1 666 tests 1 610 ✅ 56 💤 0 ❌
2 306 runs  2 232 ✅ 74 💤 0 ❌

Results for commit e1db22c.

♻️ This comment has been updated with latest results.

To speed up review, make sure that you have read Contributing to Erlang/OTP and that all checks pass.

See the TESTING and DEVELOPMENT HowTo guides for details about how to run test locally.

Artifacts

// Erlang/OTP Github Action Bot

garazdawi
garazdawi previously approved these changes Mar 23, 2026
According to [1], term_variables: bool*, num*, std* are
`NCURSES_CONST char * const`. Where NCURSES_CONST is defined by
ncurses configuration scripts [2].

1: https://man7.org/linux/man-pages/man3/term_variables.3x.html
2: https://github.com/mirror/ncurses/blob/master/configure.in#L1228
@joaohf joaohf force-pushed the fix-term-variables-imcompatible-pointer branch from 8e78700 to e1db22c Compare March 23, 2026 17:44
@joaohf
Copy link
Copy Markdown
Contributor Author

joaohf commented Mar 23, 2026

Hi,

Builds for iOS and Windows are failing. I'll try to fix it.

@frazze-jobb frazze-jobb self-assigned this Mar 24, 2026
@frazze-jobb frazze-jobb added team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI labels Mar 24, 2026
@frazze-jobb frazze-jobb merged commit fadaccc into erlang:master Apr 2, 2026
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

team:VM Assigned to OTP team VM testing currently being tested, tag is used by OTP internal CI

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants