From a866e90342b8797b8fa28fdbcca975daed3f5c05 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Wed, 13 May 2009 17:29:48 +0000 Subject: Make g++ 4.4 happy (warning about out of bounds access). svn-id: r40526 --- sound/softsynth/opl/opl_impl.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'sound') diff --git a/sound/softsynth/opl/opl_impl.h b/sound/softsynth/opl/opl_impl.h index 4ea8793965..c5ef87ce3c 100644 --- a/sound/softsynth/opl/opl_impl.h +++ b/sound/softsynth/opl/opl_impl.h @@ -632,7 +632,11 @@ void adlib_write(Bitu idx, Bit8u val) { int num = idx&7; Bitu base = (idx-ARC_TVS_KSR_MUL)&0xff; if ((num<6) && (base<22)) { +#if defined(OPLTYPE_IS_OPL3) Bitu modop = regbase2modop[second_set?(base+22):base]; +#else + Bitu modop = regbase2modop[base]; +#endif Bitu regbase = base+second_set; Bitu chanbase = second_set?(modop-18+ARC_SECONDSET):modop; @@ -662,7 +666,11 @@ void adlib_write(Bitu idx, Bit8u val) { int num = idx&7; Bitu base = (idx-ARC_KSL_OUTLEV)&0xff; if ((num<6) && (base<22)) { +#if defined(OPLTYPE_IS_OPL3) Bitu modop = regbase2modop[second_set?(base+22):base]; +#else + Bitu modop = regbase2modop[base]; +#endif Bitu chanbase = second_set?(modop-18+ARC_SECONDSET):modop; // change frequency calculations of this operator as -- cgit v1.2.3