Alexandre Julliard : inetcomm: Avoid a compiler warning.

Alexandre Julliard julliard at winehq.org
Mon Sep 15 06:54:13 CDT 2008


Module: wine
Branch: master
Commit: 9099c212d13a86f741359058a3101c869648f7bf
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=9099c212d13a86f741359058a3101c869648f7bf

Author: Alexandre Julliard <julliard at winehq.org>
Date:   Fri Sep 12 17:09:07 2008 +0200

inetcomm: Avoid a compiler warning.

---

 dlls/inetcomm/mimeintl.c |    5 ++---
 1 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/dlls/inetcomm/mimeintl.c b/dlls/inetcomm/mimeintl.c
index 5215f66..626ad62 100644
--- a/dlls/inetcomm/mimeintl.c
+++ b/dlls/inetcomm/mimeintl.c
@@ -168,9 +168,6 @@ static HRESULT WINAPI MimeInternat_GetCodePageCharset(IMimeInternational *iface,
 
     *phCharset = NULL;
 
-    if(ctCsetType < CHARSET_BODY || ctCsetType > CHARSET_WEB)
-        return MIME_E_INVALID_CHARSET_TYPE;
-
     hr = mlang_getcodepageinfo(cpiCodePage, &mlang_cp_info);
     if(SUCCEEDED(hr))
     {
@@ -189,6 +186,8 @@ static HRESULT WINAPI MimeInternat_GetCodePageCharset(IMimeInternational *iface,
         case CHARSET_WEB:
             charset_nameW = mlang_cp_info.wszWebCharset;
             break;
+        default:
+            return MIME_E_INVALID_CHARSET_TYPE;
         }
         len = WideCharToMultiByte(CP_ACP, 0, charset_nameW, -1, NULL, 0, NULL, NULL);
         charset_name = HeapAlloc(GetProcessHeap(), 0, len);




More information about the wine-cvs mailing list