- Fix WMC and mkhive warnings
authorStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Jan 2009 20:42:13 +0000 (20:42 +0000)
committerStefan Ginsberg <stefanginsberg@gmail.com>
Sun, 18 Jan 2009 20:42:13 +0000 (20:42 +0000)
- Fix the unitialized variable warning in freetype (done the same way in freetype trunk)
- Make CRT compile warning-free again, and re-remove allowwarnings=true
- Make libxml compile warning-free too

svn path=/trunk/; revision=38911

16 files changed:
reactos/dll/3rdparty/freetype/freetype.rbuild
reactos/dll/3rdparty/freetype/src/autofit/aflatin.c
reactos/lib/3rdparty/libxml2/catalog.c
reactos/lib/3rdparty/libxml2/libxml2.rbuild
reactos/lib/3rdparty/libxml2/nanoftp.c
reactos/lib/3rdparty/libxml2/nanohttp.c
reactos/lib/3rdparty/libxml2/threads.c
reactos/lib/3rdparty/libxml2/trionan.c
reactos/lib/3rdparty/libxml2/uri.c
reactos/lib/sdk/crt/crt.rbuild
reactos/lib/sdk/crt/except/cppexcept.c
reactos/tools/mkhive/cmi.c
reactos/tools/mkhive/mkhive.rbuild
reactos/tools/mkhive/rtl.c
reactos/tools/wmc/wmc.rbuild
reactos/tools/wmc/wmctypes.h

index c091ce0..d810cc1 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="freetype" type="kernelmodedll" entrypoint="0" baseaddress="${BASEADDRESS_FREETYPE}" installbase="system32" installname="freetype.dll" allowwarnings="true" crt="libcntpr">
+<module name="freetype" type="kernelmodedll" entrypoint="0" baseaddress="${BASEADDRESS_FREETYPE}" installbase="system32" installname="freetype.dll" crt="libcntpr">
        <importlibrary definition="freetype.def" />
        <include base="freetype">include</include>
        <define name="_DISABLE_TIDENTS" />
index 9c05c47..647c48c 100644 (file)
         FT_UInt     glyph_index;\r
         FT_Int      best_point, best_y, best_first, best_last;\r
         FT_Vector*  points;\r
-        FT_Bool     round;\r
+        FT_Bool     round = 0;\r
 \r
 \r
         AF_LOG(( "'%c'", *p ));\r
index af84b7c..b17563a 100644 (file)
@@ -3250,7 +3250,7 @@ xmlLoadCatalogs(const char *pathss) {
                cur++;
            path = xmlStrndup((const xmlChar *)paths, cur - paths);
 #ifdef _WIN32
-        iLen = strlen(path);
+        iLen = strlen((const char *)path);
         for(i = 0; i < iLen; i++) {
             if(path[i] == '\\') {
                 path[i] = '/';
index 822f8b5..dd4338a 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd">
-<module name="libxml2" type="staticlibrary" allowwarnings="true" crt="dll">
+<module name="libxml2" type="staticlibrary" crt="dll">
        <define name="HAVE_CONFIG_H" />
        <define name="WIN32" />
        <define name="_WINDOWS" />
index a54b85b..55b9d32 100644 (file)
 
 
 #if defined(__MINGW32__) || defined(_WIN32_WCE)
+#ifndef _WINSOCKAPI_
 #define _WINSOCKAPI_
+#endif
 #include <wsockcompat.h>
 #include <winsock2.h>
 #undef XML_SOCKLEN_T
-#define XML_SOCKLEN_T unsigned int
+#define XML_SOCKLEN_T int
 #endif
 
 /**
index 9001ae5..4d4fa2e 100644 (file)
 #endif
 
 #if defined(__MINGW32__) || defined(_WIN32_WCE)
+#ifndef _WINSOCKAPI_
 #define _WINSOCKAPI_
+#endif
 #include <wsockcompat.h>
 #include <winsock2.h>
 #undef XML_SOCKLEN_T
-#define XML_SOCKLEN_T unsigned int
+#define XML_SOCKLEN_T int
 #endif
 
 
index 23cb200..e7dd417 100644 (file)
@@ -453,7 +453,7 @@ __xmlGlobalInitMutexLock(void)
 
         /* Swap it into the global_init_lock */
 #ifdef InterlockedCompareExchangePointer
-        InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);
+        (void)InterlockedCompareExchangePointer(&global_init_lock, cs, NULL);
 #else /* Use older void* version */
         InterlockedCompareExchange((void **) &global_init_lock,
                                    (void *) cs, NULL);
@@ -936,7 +936,7 @@ xmlOnceInit(void)
 
 #if defined(HAVE_WIN32_THREADS)
     if (!run_once.done) {
-        if (InterlockedIncrement(&run_once.control) == 1) {
+        if (InterlockedIncrement((PLONG)&run_once.control) == 1) {
 #if !defined(HAVE_COMPILER_TLS)
             globalkey = TlsAlloc();
 #endif
index 00b2042..b7a6557 100644 (file)
@@ -58,6 +58,7 @@
 #  endif
 #endif
 /* Small ReactOS hack */
+#undef fpclassify
 #define fpclassify _fpclass
 #include <assert.h>
 
@@ -213,6 +214,7 @@ TRIO_ARGS2((number, has_mantissa),
   return is_special_quantity;
 }
 
+#if 0
 /*
  * trio_is_negative
  */
@@ -230,6 +232,7 @@ TRIO_ARGS1((number),
   }
   return is_negative;
 }
+#endif
 
 #endif /* USE_IEEE_754 */
 
index 28401c8..33e33d0 100644 (file)
@@ -2453,7 +2453,6 @@ xmlCanonicPath(const xmlChar *path)
  */
 #if defined(_WIN32) && !defined(__CYGWIN__)    
     int len = 0;
-    int i = 0;
     xmlChar *p = NULL;
 #endif
     xmlURIPtr uri;
@@ -2522,7 +2521,7 @@ path_processing:
     len = xmlStrlen(path);
     if ((len > 2) && IS_WINDOWS_PATH(path)) {
         /* make the scheme 'file' */
-       uri->scheme = xmlStrdup(BAD_CAST "file");
+       uri->scheme = (char*)xmlStrdup(BAD_CAST "file");
        /* allocate space for leading '/' + path + string terminator */
        uri->path = xmlMallocAtomic(len + 2);
        if (uri->path == NULL) {
@@ -2531,15 +2530,15 @@ path_processing:
        }
        /* Put in leading '/' plus path */
        uri->path[0] = '/';
-       p = uri->path + 1;
-       strncpy(p, path, len + 1);
+       p = (xmlChar *)uri->path + 1;
+       strncpy((char *)p, (const char *)path, len + 1);
     } else {
-       uri->path = xmlStrdup(path);
+       uri->path = (char*)xmlStrdup(path);
        if (uri->path == NULL) {
            xmlFreeURI(uri);
            return(NULL);
        }
-       p = uri->path;
+       p = (xmlChar *)uri->path;
     }
     /* Now change all occurences of '\' to '/' */
     while (*p != '\0') {
index b39c50c..08c2012 100644 (file)
@@ -15,7 +15,7 @@
        </directory>
 </module>
 
-<module name="crt" type="staticlibrary" allowwarnings="true">
+<module name="crt" type="staticlibrary">
        <library>chkstk</library>
        <include base="crt">.</include>
        <include base="crt">include</include>
index 5e301da..f84682d 100644 (file)
@@ -105,6 +105,7 @@ static void dump_exception_type( const cxx_exception_type *type )
 
 static void dump_function_descr( const cxx_function_descr *descr )
 {
+#ifndef WINE_NO_TRACE_MSGS
     UINT i;
     int j;
 
@@ -122,6 +123,7 @@ static void dump_function_descr( const cxx_function_descr *descr )
                  descr->tryblock[i].start_level, descr->tryblock[i].end_level,
                  descr->tryblock[i].catch_level, descr->tryblock[i].catchblock,
                  descr->tryblock[i].catchblock_count );
+
         for (j = 0; j < descr->tryblock[i].catchblock_count; j++)
         {
             const catchblock_info *ptr = &descr->tryblock[i].catchblock[j];
@@ -130,6 +132,7 @@ static void dump_function_descr( const cxx_function_descr *descr )
                      ptr->type_info, dbgstr_type_info( ptr->type_info ) );
         }
     }
+#endif
 }
 
 /* check if the exception type is caught by a given catch block, and return the type that matched */
index 147b20d..72b3908 100644 (file)
@@ -241,8 +241,6 @@ CmiAddSubKey(
        HSTORAGE_TYPE Storage;
        ULONG i;
 
-       DPRINT("CmiAddSubKey(%p '%wZ')\n", RegistryHive, SubKeyName);
-
        VERIFY_KEY_CELL(ParentKeyCell);
 
        /* Skip leading backslash */
@@ -523,8 +521,6 @@ CmiScanForSubKey(
 
        VERIFY_KEY_CELL(KeyCell);
 
-       DPRINT("CmiScanForSubKey('%wZ')\n", SubKeyName);
-
        ASSERT(RegistryHive);
 
        *pSubKeyCell = NULL;
index 341d1dc..d4a95fd 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../tools/rbuild/project.dtd">
-<module name="mkhive" type="buildtool" allowwarnings="true">
+<module name="mkhive" type="buildtool">
        <include base="inflibhost">.</include>
        <include base="cmlibhost">.</include>
        <include base="zlibhost">.</include>
index eec2fc3..85fc04b 100644 (file)
@@ -7,6 +7,12 @@
 #include <stdlib.h>
 #include <stdarg.h>
 
+/* gcc defaults to cdecl */
+#if defined(__GNUC__)
+#undef __cdecl
+#define __cdecl
+#endif
+
 #include "mkhive.h"
 #include <bitmap.c>
 
index 6822c82..f548ac5 100644 (file)
@@ -1,6 +1,6 @@
 <?xml version="1.0"?>
 <!DOCTYPE module SYSTEM "../../tools/rbuild/project.dtd">
-<module name="wmc" type="buildtool" allowwarnings="true">
+<module name="wmc" type="buildtool">
        <define name="WINE_UNICODE_API">" "</define>
        <include base="unicode">.</include>
        <library>unicode</library>
index 9fdb3a7..8842003 100644 (file)
@@ -22,6 +22,7 @@
 #define __WMC_WMCTYPES_H
 
 #include <stdarg.h>
+#include <string.h>
 #include <host/typedefs.h>
 
 /* Byteordering defines */