[ オリジナルレポート ]

BugID: #03435

カテゴリ 重要度 ステータス 解決状況 登録日時 最終更新
コンパイル解決済み修正済み2009-09-10 19:332009-09-10 22:30
 
テスターqmc2担当者hapソース
バージョン0.133u5発生バージョン修正バージョン0.134u1
修正コミットプルリク
フラグ
セット
セット詳細
 
概 要openSUSE 11.1 x86環境で、警告gcc warning for src/emu/sound/ymf271.cがでる。
詳 細On openSUSE 11.1 x86 I get the following warning (treated as an error) when compiling with OPTIMIZE=3:

cc1: warnings being treated as errors
src/emu/sound/ymf271.c: In function ‘device_start_ymf271’:
src/emu/sound/ymf271.c:1630: error: ‘plfo[3]’ may be used uninitialized in this function
src/emu/sound/ymf271.c:1630: note: ‘plfo[3]’ was declared here
make: *** [obj/sdl/mame/emu/sound/ymf271.o] Error 1
make: *** Waiting for unfinished jobs....

This is stupid, I know, but a simple initialization of the array works around the issue (on line 1630 of src/emu/sound/ymf271.c):

double plfo[4] = {0, 0, 0, 0};
再現手順 
追加情報$ uname -a
Linux linux-a41b 2.6.27.29-0.1-default #1 SMP 2009-08-15 17:53:59 +0200 i686 i686 i386 GNU/Linux

$ gcc -v
Using built-in specs.
Target: i586-suse-linux
Configured with: ../configure --prefix=/usr --infodir=/usr/share/info --mandir=/usr/share/man --libdir=/usr/lib --libexecdir=/usr/lib --enable-languages=c,c++,objc,fortran,obj-c++,java,ada --enable-checking=release --with-gxx-include-dir=/usr/include/c++/4.3 --enable-ssp --disable-libssp --with-bugurl=http://bugs.opensuse.org/ --with-pkgversion='SUSE Linux' --disable-libgcj --disable-libmudflap --with-slibdir=/lib --with-system-zlib --enable-__cxa_atexit --enable-libstdcxx-allocator=new --disable-libstdcxx-pch --enable-version-specific-runtime-libs --program-suffix=-4.3 --enable-linux-futex --without-system-libunwind --with-cpu=generic --build=i586-suse-linux
Thread model: posix
gcc version 4.3.2 [gcc-4_3-branch revision 141291] (SUSE Linux)

I don't get that warning on openSUSE 11.0 x64, which uses gcc 4.3.1.
 
添付ファイル