gcc 4.9.2 and debug.cpp LOG() error, patch provided

Developer's Forum, for discussion of bugs, code, and other developmental aspects of DOSBox.

gcc 4.9.2 and debug.cpp LOG() error, patch provided

Postby rajmurt » 2014-12-24 @ 23:46

I tried to compile dosbox 0.74 with debug feature using gcc 4.9.2, and I am getting the following error (not exact, from memory):

src/debug/debug.cpp error: LOG(..)(out1) not literal string ...

I had to fix this by getting rid of out1 variable and sprintf() function call and just applying the formatting string and parameters directly in LOG()().

Maybe we shouldn't use temporary out1 character array in forming log messages at all? I don't see any advantage of doing that other than wasting 512 bytes of memory. I'm attaching a patch file for review.
Attachments
dosbox-debug-LOG.patch
(5.67 KiB) Downloaded 59 times
rajmurt
Newbie
 
Posts: 5
Joined: 2013-1-03 @ 14:43

Re: gcc 4.9.2 and debug.cpp LOG() error, patch provided

Postby Dominus » 2014-12-25 @ 09:07

You should use SVN of dosbox for such things to make sure that stuff is not already fixed...
User avatar
Dominus
DOSBox Moderator
 
Posts: 7375
Joined: 2002-10-03 @ 09:54
Location: Vienna


Return to DOSBox Development

Who is online

Users browsing this forum: No registered users and 5 guests