dankamongmen / panelreels

high-level objects built atop ncurses
https://nick-black.com/dankwiki/index.php/Outcurses
Apache License 2.0
8 stars 1 forks source link

Compiler warnings about undeclared curses functions #35

Closed dankamongmen closed 4 years ago

dankamongmen commented 4 years ago

I consistently get these two warnings, on both my Debian and Arch machines:

[ 38%] Building C object CMakeFiles/outcurses-demo.dir/src/bin/demo.c.o
/home/dank/src/dankamongmen/outcurses-0.0.4/src/bin/demo.c:220:3: warning: 
      implicit declaration of function 'mvwaddwstr' is invalid in C99
      [-Wimplicit-function-declaration]
  mvwaddwstr(w, 0, 0, L"wide chars, multiple colors…");
  ^
/home/dank/src/dankamongmen/outcurses-0.0.4/src/bin/demo.c:226:5: warning: 
      implicit declaration of function 'waddwstr' is invalid in C99
      [-Wimplicit-function-declaration]
    waddwstr(w, *s);
    ^

We link successfully, but don't see these at include time. Looking at the header, they're within guards:

#if NCURSES_WIDECHAR

this makes me think we're only linking to ncursesw, and not properly setting things for compilation time, which can't be good.

dankamongmen commented 4 years ago

We weren't supplying the proper compiler definitions to tests and demo, only the core library. It's fixed now.

dankamongmen commented 4 years ago

This is fixed, but we've exposed a lot of compiler warnings as a result, so let's get those fixed up.