Menu ▾ ▴

#2 Patches to silence gcc 5 warnings about deprecated string constant to "char *" conversion

v1.0 (example)
open
nobody
None
5
2017-04-21
2017-04-21
J G Miller
No

With the arrival of gcc 5 and much stricter checking of variable types, compilation of Time.app produces a multitude of warnings (especially from the inclusion of the pixmap files) about deprecated string constant to char "star" conversions.

These warnings can be silenced using thr following patches to apply casts at appropriate places and to change the xpm files from type char "star" to type const char "star", resulting in a quiet "make".

make 

c++ -Wall -pedantic -fno-rtti -fno-exceptions -O2 -I/usr/local/include   -c -o Main.o Main.cc
c++ -Wall -pedantic -fno-rtti -fno-exceptions -O2 -I/usr/local/include   -c -o Time.o Time.cc
c++ -Wall -pedantic -fno-rtti -fno-exceptions -O2 -I/usr/local/include   -c -o Xpm.o Xpm.cc
c++ Main.o Time.o Xpm.o -o Time.app -L/usr/local/lib -lXpm -lXext -lX11
6 Attachments

Discussion


Log in to post a comment.