pkgsrc-Bugs archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pkg/50862: pkgsrc/emulators/xnp2 compile failed: invalid cast from type 'int' to type '__intptr_t {aka long int}'
>Number: 50862
>Category: pkg
>Synopsis: pkgsrc/emulators/xnp2 compile failed: invalid cast from type 'int' to type '__intptr_t {aka long int}'
>Confidential: no
>Severity: critical
>Priority: medium
>Responsible: pkg-manager
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sat Feb 27 14:25:00 +0000 2016
>Originator: Jun Ebihara
>Release: 7.99.26 / pkgsrc 2016/2/26
>Organization:
SOUM Corporation
>Environment:
NetBSD rpi_green 7.99.26 NetBSD 7.99.26 (RPI2.201602172150Z) evbarm
>Description:
pkgsrc/emulators/xnp2 compile failed with RPI2(earmv6hf)
--- ./../x11/ext/xnp21-opna.o ---
./../x11/ext/opna.cpp: In function 'void opna_destruct(POPNA)':
./../x11/ext/opna.cpp:37:48: error: invalid cast from type 'int' to type '__intptr_t {aka long int}'
opna->userdata = reinterpret_cast<INTPTR>(NULL);
^
./../x11/ext/opna.cpp: In function 'void opna_reset(POPNA, UINT)':
./../x11/ext/opna.cpp:76:50: error: invalid cast from type 'int' to type '__intptr_t {aka long int}'
opna->userdata = reinterpret_cast<INTPTR>(NULL);
^
--- ./../x11/ext/scci/xnp21-sccisoundinterface.o ---
c++ -DHAVE_CONFIG_H -DSYSRESPATH=\""/usr/pkg/share/xnp2"\" -I. -I./.. -I./../x11 -I./../x11/gtk2 -I./../x11/debug -I./../common -I./../cbus -I./../generic -I./../io -I./../mem -I./../sound -I./../vram -D_REENTRANT -pthread -I/usr/pkg/include/gtk-2.0 -I/usr/pkg/lib/gtk-2.0/include -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/glib/gio-unix-2.0/ -I/usr/X11R7/include -I/usr/pkg/include/cairo -I/usr/pkg/include/atk-1.0 -I/usr/pkg/include/cairo -I/usr/X11R7/include/pixman-1 -I/usr/pkg/include/libpng16 -I/usr/X11R7/include -I/usr/pkg/include/gdk-pixbuf-2.0 -I/usr/pkg/include/libpng16 -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/harfbuzz -I/usr/pkg/include/pango-1.0 -I/usr/pkg/include/glib/glib-2.0 -I/usr/pkg/lib/glib-2.0/include -I/usr/pkg/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -I/usr/pkg/include/SDL -D_GNU_SOURCE=1 -D_REENTRANT -D_THREAD_SAFE -I/usr/pkg/include/libusb-1.0 -D_REENTRANT -I/usr/X11R7/include
-D_REENTRANT -I/usr/X11R7/include -DX11_BUILD_ALL -I./../i386c -I./../i386c/ia32 -I./../i386c/ia32/instructions -I./../i386c/ia32/instructions/fpu -DCPUCORE_IA32 -DPNG_NO_ASSEMBLER_CODE -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include/libdrm -I/usr/pkg/include/SDL -DNDEBUG -fsigned-char -fno-strict-aliasing -std=c++11 -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include/libdrm -I/usr/pkg/include/SDL -pthread -c -o ./../x11/ext/scci/xnp21-sccisoundinterface.o `test -f './../x11/ext/scci/sccisoundinterface.cpp' || echo './'`./../x11/ext/scci/sccisoundinterface.cpp
--- ./../x11/ext/xnp21-opl3.o ---
./../x11/ext/opl3.cpp: In function 'void opl3_destruct(POPL3)':
./../x11/ext/opl3.cpp:35:48: error: invalid cast from type 'int' to type '__intptr_t {aka long int}'
opl3->userdata = reinterpret_cast<INTPTR>(NULL);
^
./../x11/ext/opl3.cpp: In function 'void opl3_reset(POPL3, UINT)':
./../x11/ext/opl3.cpp:58:50: error: invalid cast from type 'int' to type '__intptr_t {aka long int}'
opl3->userdata = reinterpret_cast<INTPTR>(NULL);
^
>How-To-Repeat:
1. Install RPI2 ,201602172150Z from nyftp tarball.
https://mail-index.netbsd.org/port-arm/2016/02/24/msg003689.html
2. use pkgsrc-HEAD (2016/2/27)
3. cd /usr/pkgsrc/emulators/xnp2
4. make
>Fix:
use static_cast instead reinterpret_cast.
diagnosed by nonaka@ on OpenSourceConference2016 Tokyo/Spring.
--- work.earmv6hf.1/xnp2-0.85/x11/ext/opl3.cpp 2016-01-16 15:19:13.000000000 +0000
+++ work.earmv6hf/xnp2-0.85/x11/ext/opl3.cpp
@@ -32,7 +32,7 @@ void opl3_destruct(POPL3 opl3)
{
CExternalOpl3* pExt = reinterpret_cast<CExternalOpl3*>(opl3->userdata);
CExternalChipManager::GetInstance()->Release(pExt);
- opl3->userdata = reinterpret_cast<INTPTR>(NULL);
+ opl3->userdata = static_cast<INTPTR>(NULL);
}
/**
@@ -55,7 +55,7 @@ void opl3_reset(POPL3 opl3, REG8 cCaps)
if (pExt)
{
CExternalChipManager::GetInstance()->Release(pExt);
- opl3->userdata = reinterpret_cast<INTPTR>(NULL);
+ opl3->userdata = static_cast<intptr_t>(NULL);
}
}
}
--- work.earmv6hf.1/xnp2-0.85/x11/ext/opna.cpp 2016-01-16 15:19:13.000000000 +0000
+++ work.earmv6hf/xnp2-0.85/x11/ext/opna.cpp
@@ -34,7 +34,7 @@ void opna_destruct(POPNA opna)
{
CExternalOpna* pExt = reinterpret_cast<CExternalOpna*>(opna->userdata);
CExternalChipManager::GetInstance()->Release(pExt);
- opna->userdata = reinterpret_cast<INTPTR>(NULL);
+ opna->userdata = static_cast<INTPTR>(NULL);
}
/**
@@ -73,7 +73,7 @@ void opna_reset(POPNA opna, REG8 cCaps)
if (pExt)
{
CExternalChipManager::GetInstance()->Release(pExt);
- opna->userdata = reinterpret_cast<INTPTR>(NULL);
+ opna->userdata = static_cast<INTPTR>(NULL);
}
}
}
Home |
Main Index |
Thread Index |
Old Index