msxml3: avoid a dangling else (LLVM/Clang)

Austin English austinenglish at gmail.com
Mon May 14 01:01:10 CDT 2012


clang -c -I. -I. -I../../include -I../../include
-I/usr/include/libxml2   -I/usr/include/libxml2   -D__WINESRC__
-DCOM_NO_WINDOWS_H -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing
-Wdeclaration-after-statement -Wempty-body -Wignored-qualifiers
-Wstrict-prototypes -Wtype-limits -Wwrite-strings
-fno-omit-frame-pointer -Wpointer-arith -I/usr/include/freetype2    -g
-O0 -std=gnu89  -o domdoc.o domdoc.c
domdoc.c:2281:48: warning: add explicit braces to avoid dangling else
[-Wdangling-else]
                    if (isspaceW(*ptr)) ptr++; else break;

-- 
-Austin
-------------- next part --------------
diff --git a/dlls/msxml3/domdoc.c b/dlls/msxml3/domdoc.c
index 6805c75..14fd01b 100644
--- a/dlls/msxml3/domdoc.c
+++ b/dlls/msxml3/domdoc.c
@@ -2277,8 +2277,10 @@ static HRESULT WINAPI domdoc_loadXML(
 
             /* skip leading spaces if needed */
             if (This->properties->version == MSXML_DEFAULT || This->properties->version == MSXML26)
+            {
                  while (*ptr)
                     if (isspaceW(*ptr)) ptr++; else break;
+            }
 
             xmldoc = doparse(This, (char*)ptr, strlenW(ptr)*sizeof(WCHAR), XML_CHAR_ENCODING_UTF16LE);
             if ( !xmldoc )


More information about the wine-patches mailing list