News:

Latest versions:
Server plugin: 0.5.1
MVP dongle: 0.5.2
Raspberry Pi client: 0.5.2
Windows client: 0.5.2-1

Main Menu

Server compilation errors with GCC 4.2

Started by davep, October 14, 2007, 15:59:19

Previous topic - Next topic

davep

I've just upgraded my server from Mandriva 2007.1 to 2008.0, which has updated the compiler to GCC 4.2.2 (pre-release). Compiling the VOMP plugin now fails with messages such as these:

tftpclient.c: In member function 'int TftpClient::openFile(char*)':
tftpclient.c:275: warning: deprecated conversion from string constant to 'char*'
tftpclient.c:275: warning: deprecated conversion from string constant to 'char*'
tftpclient.c:283: warning: deprecated conversion from string constant to 'char*'
tftpclient.c:283: warning: deprecated conversion from string constant to 'char*'

As a workaround I modified the Makefile

#CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual -Werror
CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual

which lets VOMP compile, though there are hundreds of error messages.

Dave

Chris

Thanks for reporting that, I'll add it to the to-do list.

keynet

Me too on SuSe 10.3,  FYI the following files:
media.c
tftpclient.c
mvpreceiver.c
log.c
config.c
recplayer.c
mvprelay.c
tcp.c
bootpd.c
udpreplier.c
dsock.c

davep

The attached patch (against CVS) stops the compiler warnings, and I've been running it for a week with no problems.

Chris

Hello, I have applied the patch file, thanks. Could you check it's ok now with the normal error options on the compiler line? Thanks.

keynet

Chris,
After your patch, I re-ran cvs -z3 -d:pserver:anonymous@vomp.cvs.sourceforge.net:/cvsroot/vomp co -P vompserver to update my files,
The other files are OK, but this remains:

g++ -O2 -fPIC -Wall -Woverloaded-virtual -Werror -c -D_GNU_SOURCE -DPLUGIN_NAME_I18N='"vompserver"' -I../../../in                       /include -o bootpd.o bootpd.c
cc1plus: warnings being treated as errors
bootpd.c: In member function 'void Bootpd::processRequest(UCHAR*, int)':
bootpd.c:144: warning: the address of 'newClientIP' will always evaluate as 'true'
make[1]: *** [bootpd.o] Error 1

HTH

Chris

That last issue should be fixed now. Thanks for reporting it.