Opened 12 years ago
Closed 12 years ago
Last modified 5 years ago
#5570 closed defect (fixed)
MIDI compile warnings
|Reported by:||SF/ezekiel000||Owned by:||fingolfin|
I build my own version of ScummVM whenever one of the WIP engines I'm interested in is updated. When I do my own build it builds clean with only one error, the following shows up in the terminal (only the relevant section and one line before and after): C++ backends/midi/seq.o backends/midi/seq.cpp: In member function ‘virtual void MidiDriver_SEQ::send(uint32)’: backends/midi/seq.cpp:150: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result backends/midi/seq.cpp: In member function ‘virtual void MidiDriver_SEQ::sysEx(const byte*, uint16)’: backends/midi/seq.cpp:175: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result C++ backends/midi/stmidi.o C++ backends/midi/timidity.o backends/midi/timidity.cpp: In member function ‘char* MidiDriver_TIMIDITY::timidity_ctl_command(const char*, ...)’: backends/midi/timidity.cpp:340: warning: ignoring return value of ‘ssize_t write(int, const void*, size_t)’, declared with attribute warn_unused_result C++ backends/midi/dmedia.o
I use the following to configure my build: ./configure --enable-mohawk --enable-sword25 --disable-he --disable-agi --disable-agos --disable-agos2 --disable-cine --disable-cruise --disable-draci --disable-drascula --disable-gob --disable-groovie --disable-kyra --disable-lure --disable-parallaction --disable-queen --disable-saga --disable-ihnm --disable-sci --disable-sky --disable-teenagent --disable-touche --disable-tucker --disable-debug --disable-mt32emu --disable-mad --disable-flac --disable-fluidsynth --disable-readline --enable-release
I have attached the output of configure, I have the options I want built in but disable or don't provide the libs for Flac, Mp3, mpeg2, fluidsynth. I'm running Ubuntu 10.10 amd64 (quad core) the latest build I've made (which all the info comes from) is SVN 55153.
Ticket imported from: #3153076. Ticket imported from: bugs/5570.
Change History (17)
by , 12 years ago
comment:1 by , 12 years ago
I can not see an actual error message here, so you might want to include it too so we can take a look at it. I personally am unaware of any build error currently and I am on Linux/amd64 myself.
comment:2 by , 12 years ago
Sorry maybe I shouldn't of said error, maybe warning is the right word to use. It's not a major problem I just see it go passed every time I build a new version and thought I should report it.
comment:3 by , 12 years ago
Fixed in r55248
comment:4 by , 12 years ago
|Status:||new → closed|
|Summary:||MIDI compile error → MIDI compile warnings|
comment:5 by , 12 years ago
Reopening, according to ezekiel000, that revision didn't fix the warnings he has
comment:6 by , 12 years ago
|Status:||closed → new|
comment:7 by , 12 years ago
I compiled r55250 today and the warnings are still there. I assume the warnings are not for something broken but not good practice in programming and so something may go wrong or it might cause memory leaks right?
comment:8 by , 12 years ago
I decided to try a build with default configure option and those warnings don't show up so I'm now getting my pc to rebuild scummvm over and over with each of the option I have above taken out and writing the output to a file and I'll let you know with which options the warnings show up.
comment:9 by , 12 years ago
These warnings only show if you pass --enable-release to the configure script.
comment:10 by , 12 years ago
Yeah it is probably only outputted when optimizations are enabled, since the codepath (inside gcc) which outputs these warnings is only run that way.
Anyway you are right in the sense that these are mostly style warnings, it is not related to any leaks or the like though. The only thing that could happen is that the write fails, i.e. transmitting data to the connected MIDI "device" fails.
comment:11 by , 12 years ago
|Status:||new → closed|
comment:12 by , 12 years ago
I commited a potential fix in revision 55851, please give it a try.
comment:13 by , 12 years ago
That has fixed the first two in seq.cpp but the warning in timidity.cpp is still appearing.
comment:14 by , 12 years ago
Oops, I overlooked the timidity line. Should be fixed now!
comment:15 by , 12 years ago
Yep that fixed it thank you.
comment:16 by , 5 years ago
|Component:||→ Audio: MT32|
Output for configure.