Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Not compatible with ncurses >= 6.3 #7

Open
dvzrv opened this issue Dec 30, 2021 · 0 comments · May be fixed by #8
Open

Not compatible with ncurses >= 6.3 #7

dvzrv opened this issue Dec 30, 2021 · 0 comments · May be fixed by #8

Comments

@dvzrv
Copy link

dvzrv commented Dec 30, 2021

Ncurses 6.3 introduced fprint-style format strings, which leads to pcurses not compiling:

build/pcurses/src/pcurses/src/cursesframe.cpp: In member function ‘virtual void CursesFrame::refresh()’:
/build/pcurses/src/pcurses/src/cursesframe.cpp:96:18: error: format not a string literal and no format arguments [-Werror=format-security]
   96 |         mvwprintw(w_border, 0, 1, header.c_str());
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/pcurses/src/pcurses/src/cursesframe.cpp:99:18: error: format not a string literal and no format arguments [-Werror=format-security]
   99 |         mvwprintw(w_border, w_border->_maxy, 1, footer.c_str());
      |         ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/pcurses/src/pcurses/src/cursesframe.cpp: In member function ‘void CursesFrame::printw(std::string, int)’:
/build/pcurses/src/pcurses/src/cursesframe.cpp:111:12: error: format not a string literal and no format arguments [-Werror=format-security]
  111 |     wprintw(w_main, fitstrtowin(str).c_str());
      |     ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/build/pcurses/src/pcurses/src/cursesframe.cpp: In member function ‘void CursesFrame::mvprintw(int, int, std::string, int)’:
/build/pcurses/src/pcurses/src/cursesframe.cpp:122:14: error: format not a string literal and no format arguments [-Werror=format-security]
  122 |     mvwprintw(w_main, y, x, fitstrtowin(str, x).c_str());
      |     ~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
dvzrv added a commit to dvzrv/pcurses that referenced this issue Dec 30, 2021
src/cursesframe.cpp:
Change occurrences of `wprintw()` and `mvwprintw()` to use the new
fprint-style format string, introduced with ncurses 6.3.

Fixes schuay#7
@dvzrv dvzrv linked a pull request Dec 30, 2021 that will close this issue
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant