View Issue Details

IDProjectCategoryView StatusLast Update
0001226FSSCPsoundpublic2007-01-18 01:40
ReporterSrdjant Assigned Totaylor  
PrioritynormalSeveritymajorReproducibilityalways
Status resolvedResolutionwon't fix 
Product Version3.6.9 
Summary0001226: Compile error: Invalid conversion in code/sound/ds.cpp
DescriptionCompile error on code/sound/ds.cpp where a char * arguement is passed
to an openal function, which expects const ALubyte*.
Additional InformationGNU Linux 2.6.x
g++ (GCC) 3.3.6
OpenAL appears to be 0.0.8

if g++ -DPACKAGE_NAME=\"fs2_open\" -DPACKAGE_TARNAME=\"fs2_open\" -DPACKAGE_VERSION=\"3.6.9\" -DPACKAGE_STRING=\"fs2_open\ 3.6.9\" -DPACKAGE_BUGREPORT=\"\" -DNO_CD_CHECK=1 -DNDEBUG=1 -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DSCP_UNIX=1 -DNO_DIRECT3D=1 -DUSE_OPENAL=1 -I. -I. -g -Os -Wall -funroll-loops -I/usr/include/SDL -D_REENTRANT -fsigned-char -Wno-unknown-pragmas -Wno-deprecated -Wno-char-subscripts -I../lua -MT ds.o -MD -MP -MF ".deps/ds.Tpo" -c -o ds.o `test -f 'sound/ds.cpp' || echo './'`sound/ds.cpp; \
then mv -f ".deps/ds.Tpo" ".deps/ds.Po"; else rm -f ".deps/ds.Tpo"; exit 1; fi
sound/ds.cpp: In function `int ds_init(int, int, unsigned int, short unsigned
   int)':
sound/ds.cpp:1803: error: invalid conversion from `const char*' to `const
   ALubyte*'
make[1]: *** [ds.o] Error 1
make[1]: Leaving directory `/data4/Freespace2/fs2_open/code'
make: *** [all-recursive] Error 1

Patch uploaded fixes this by casting the "AL_LOKI_play_position" parameter
to the expected type.
TagsNo tags attached.

Activities

2007-01-17 00:58

 

fs2soundALtypeConversion.patch (537 bytes)   
--- code/sound/ds.cpp~  2007-01-07 12:48:18.000000000 +0000
+++ code/sound/ds.cpp   2007-01-17 00:28:22.000000000 +0000
@@ -1800,7 +1800,7 @@
        mprintf(( "\n" ));

        // make sure we can actually use AL_BYTE_LOKI (Mac/Win OpenAL doesn't have it)
-       AL_play_position = alIsExtensionPresent( "AL_LOKI_play_position" );
+       AL_play_position = alIsExtensionPresent( (const ALubyte *) "AL_LOKI_play_position" );

        if (AL_play_position)
                mprintf(( "  Using extension \"AL_LOKI_play_position\".\n" ));

taylor

2007-01-17 05:34

administrator   ~0007478

It's not a bug, you're version of OpenAL is too old. You need version 1.1 (0.0.9).

Issue History

Date Modified Username Field Change
2007-01-17 00:57 Srdjant New Issue
2007-01-17 00:58 Srdjant File Added: fs2soundALtypeConversion.patch
2007-01-17 05:34 taylor Note Added: 0007478
2007-01-18 01:40 taylor Status new => resolved
2007-01-18 01:40 taylor Resolution open => won't fix
2007-01-18 01:40 taylor Assigned To => taylor