Opened 15 years ago

Closed 15 years ago

Last modified 13 months ago

#8345 closed patch

CVS scummvm x11 backend compile fix

Reported by: SF/njoly Owned by: SF/khalek
Priority: normal Component: Ports
Keywords: Cc:
Game:

Description

I just wanted to compile CVS scummvm with x11 backend,
on my NetBSD amd64 workstation (where SDL does not
work)q; and noticed the following compilation failure :

njoly@lanfeust [temp/scummvm]> gmake
mkdir -p backends/x11/.deps g++
Wp,-MMD,"backends/x11/.deps/x11.d",-MQ,"backends/x11/x11.o",-MP
-Wall -g -ansi -W -Wno-unused-parameter -O
-Wuninitialized -Wno-long-long -Wno-multichar
-Wno-unknown-pragmas -pedantic -Wpointer-arith
-Wcast-qual -Wconversion -Wshadow -Wimplicit -Wundef
-Wnon-virtual-dtor -Wno-reorder -Wwrite-strings
-fcheck-new -Wctor-dtor-privacy -DHAVE_CONFIG_H -DUNIX
-DX11_BACKEND -DDISABLE_SAGA -DDISABLE_KYRA -I. -I.
-I./common -I/usr/X11R6/include -Itest/cxxtest -c
backends/x11/x11.cpp -o backends/x11/x11.o
backends/x11/x11.cpp: In member function `virtual void
OSystem_X11::setMouseCursor(const byte*, unsigned
int, unsigned int, int,
int, unsigned char)':
backends/x11/x11.cpp:821: error: invalid conversion
from `void*' to `byte*'
gmake: *** [backends/x11/x11.o] Error 1

There is a `malloc' call without the needed `(byte *)'
cast.

Hope this helps,
Regards.

Ticket imported from: #976657. Ticket imported from: patches/450.

Attachments (1)

scummvm-x11backend.diff (500 bytes ) - added by SF/njoly 15 years ago.
Add missing malloc cast

Download all attachments as: .zip

Change History (10)

by SF/njoly, 15 years ago

Attachment: scummvm-x11backend.diff added

Add missing malloc cast

comment:1 by SF/khalek, 15 years ago

Status: newclosed

comment:2 by SF/khalek, 15 years ago

Applied. In future it would be nice if you could file
patches under patches. Out of interest why does SDL not
work for you? It works under Linux on amd64 using a 64 bit
userland, and SDL at least works on IA32 netbsd from the
look of things.

The X11 backend was originally written for use on ipaqs so
it doesn't have several things like scaling support making
it somewhat painful to use.

comment:3 by SF/khalek, 15 years ago

Owner: set to SF/khalek

comment:4 by SF/njoly, 15 years ago

Sorry, i didn't noticed there was patch section. Will do
next time.

When using SDL backend on amd64, games crash (it works fine
on i386) :

njoly@lanfeust [games/MONKEY2]> scummvm monkey2
Switched to configuration /home/njoly/.scummvmrc
Looking for monkey2
Trying to start game 'Monkey Island 2: LeChuck's revenge'
Fatal signal: Segmentation Fault (SDL Parachute Deployed)

For monkey2, by example, it occurs early in the first animation.

comment:5 by SF/njoly, 15 years ago

Owner: SF/khalek removed

comment:6 by SF/khalek, 15 years ago

Could you provide a backtrace? Also does this happen for
other SDL applications or just ScummVM?

comment:7 by SF/khalek, 15 years ago

Owner: set to SF/khalek

comment:8 by SF/njoly, 15 years ago

Other SDL applications suffrered too.

I just reinstalled SDL, and recompiled scummvm from a fresh
CVS checkout. Everything seems to work fine now ....

Problem gone, thanks.

comment:9 by digitall, 13 months ago

Component: Ports
Note: See TracTickets for help on using tickets.