[Bug 15690] New: msvcrt: enumeration value not handled in switch
wine-bugs at winehq.org
wine-bugs at winehq.org
Sun Oct 19 23:55:15 CDT 2008
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 at winehq.org
ReportedBy: austinenglish at 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=/com.ibm.ztpf-ztpfdf.doc_put.cur/gtpm1/m1rhenm.html
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)
--
Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email
Do not reply to this email, post in Bugzilla using the
above URL to reply.
------- You are receiving this mail because: -------
You are watching all bug changes.
More information about the wine-bugs
mailing list