http://bugs.winehq.org/show_bug.cgi?id=15690
Summary: msvcrt: enumeration value not handled in switch Product: Wine Version: 1.1.6 Platform: PC OS/Version: Solaris Status: NEW Keywords: patch, source Severity: enhancement Priority: P2 Component: msvcrt AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
math.c: In function `_fpclass': math.c:391: warning: enumeration value `FP_SNAN' not handled in switch math.c:391: warning: enumeration value `FP_QNAN' not handled in switch math.c:391: warning: enumeration value `FP_NINF' not handled in switch math.c:391: warning: enumeration value `FP_PINF' not handled in switch math.c:391: warning: enumeration value `FP_NDENORM' not handled in switch math.c:391: warning: enumeration value `FP_PDENORM' not handled in switch math.c:391: warning: enumeration value `FP_NZERO' not handled in switch math.c:391: warning: enumeration value `FP_PZERO' not handled in switch math.c:391: warning: enumeration value `FP_NNORM' not handled in switch math.c:391: warning: enumeration value `FP_PNORM' not handled in switch
http://publib.boulder.ibm.com/infocenter/tpfhelp/current/index.jsp?topic=/co...
The following patch gets rid of the error, but I'm not sure if it's correct. We need to have a 'default: return;' statement of some sort.
diff --git a/dlls/msvcrt/math.c b/dlls/msvcrt/math.c index 25ac69f..30d7956 100644 --- a/dlls/msvcrt/math.c +++ b/dlls/msvcrt/math.c @@ -420,8 +420,8 @@ int CDECL _fpclass(double num) #ifdef FP_PNORM case FP_PNORM: return MSVCRT__FPCLASS_PN; #endif + default: return MSVCRT__FPCLASS_PN; } - return MSVCRT__FPCLASS_PN; #elif defined (fpclassify) switch (fpclassify( num )) {
This only appears when I compile on Open Solaris. Compiling on Ubuntu gives no warning.
bash-3.2$ gcc -v Reading specs from /usr/sfw/lib/gcc/i386-pc-solaris2.11/3.4.3/specs Configured with: /builds/sfwnv-99/usr/src/cmd/gcc/gcc-3.4.3/configure --prefix=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as --with-ld=/usr/ccs/bin/ld --without-gnu-ld --enable-languages=c,c++,f77,objc --enable-shared Thread model: posix gcc version 3.4.3 (csl-sol210-3_4-20050802)
http://bugs.winehq.org/show_bug.cgi?id=15690
--- Comment #1 from Vijay Kamuju infyquest@gmail.com 2008-11-20 11:15:31 --- please send a patch now, otherwise I have to take credit for it :)
http://bugs.winehq.org/show_bug.cgi?id=15690
--- Comment #2 from Austin English austinenglish@gmail.com 2008-11-20 18:07:38 --- (In reply to comment #1)
please send a patch now, otherwise I have to take credit for it :)
http://www.winehq.org/pipermail/wine-patches/2008-November/064921.html
http://bugs.winehq.org/show_bug.cgi?id=15690
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #3 from Austin English austinenglish@gmail.com 2008-11-21 08:14:10 --- Patch was committed.
http://bugs.winehq.org/show_bug.cgi?id=15690
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #4 from Alexandre Julliard julliard@winehq.org 2008-11-21 10:31:59 --- Closing bugs fixed in 1.1.9.