<<< Date Index >>>     <<< Thread Index >>>

compiler warnings due to ignored attrset return value



Due to the use of attrset, I get many compiler warnings such as:

curs_main.c: In function âmutt_index_menuâ:
curs_main.c:563: warning: value computed is not used
curs_main.c:566: warning: value computed is not used
curs_lib.c: In function âcurses_messageâ:
curs_lib.c:312: warning: value computed is not used
curs_lib.c:315: warning: value computed is not used
curs_lib.c: In function âmutt_show_errorâ:
curs_lib.c:457: warning: value computed is not used
curs_lib.c:460: warning: value computed is not used

menu.c: In function âprint_enriched_stringâ:
menu.c:132: warning: value computed is not used
menu.c: In function âmenu_redraw_indexâ:
menu.c:219: warning: value computed is not used
menu.c:224: warning: value computed is not used
menu.c:227: warning: value computed is not used
menu.c:232: warning: value computed is not used
menu.c:241: warning: value computed is not used
menu.c: In function âmenu_redraw_motionâ:
menu.c:278: warning: value computed is not used
menu.c:293: warning: value computed is not used
menu.c:301: warning: value computed is not used
menu.c:310: warning: value computed is not used
menu.c: In function âmenu_redraw_currentâ:
menu.c:332: warning: value computed is not used
menu.c:334: warning: value computed is not used
menu.c:337: warning: value computed is not used
menu.c:345: warning: value computed is not used

Shouldn't the return value of attrset be tested?

The attrset(3ncurses) man page under Linux says:

  RETURN VALUE
     All routines return the integer OK on success, or ERR on failure.

-- 
Vincent LefÃvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)