GCC-7 forbids implicit conversion from bool or char to pointer. As such, building torcs-1.3.6 fails with:
OpenALMusicPlayer.cpp: In member function ‘virtual bool OpenALMusicPlayer::streamBuffer(ALuint)’:
OpenALMusicPlayer.cpp:164:22: error: invalid conversion from ‘char’ to ‘const char*’ [-fpermissive]
const char* error = '\0';
^~~~
The offending line is:
const char* error = '\0';`
Debian already patches this here using nullptr, an inappropriate construct if building in c++98 mode.
Furthermore, examining the context of use:
GfError("OpenALMusicPlayer: Stream read error: %s\n", error);
Since GfError is a macro for printf and since passing a NULL char pointer to a printf %s placeholder is undefined behavior, error should ideally be implemented as a real pointer pointing to an empty cstring.
Diff:
Diff: