Expand the wine debug macros in all cases. the actual code will get optimized away, but the variables will appear in use. removes about 100-150 warnings. also fix hidden build breakages when the macros are actually used. thanks to art Modified: trunk/reactos/include/wine/debug.h Modified: trunk/reactos/lib/dbghelp/stack.c Modified: trunk/reactos/lib/kernel32/misc/lcformat.c Modified: trunk/reactos/lib/msvideo/msvfw32.xml Modified: trunk/reactos/lib/shell32/shellord.c Modified: trunk/reactos/lib/user32/controls/combo.c Modified: trunk/reactos/lib/user32/controls/edit.c Modified: trunk/reactos/lib/user32/controls/listbox.c _____
Modified: trunk/reactos/include/wine/debug.h --- trunk/reactos/include/wine/debug.h 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/include/wine/debug.h 2005-07-13 01:41:13 UTC (rev 16549) @@ -3,6 +3,7 @@
#include "../roscfg.h" #include <stdarg.h> +#include <windows.h> #include <wchar.h>
#ifndef __GNUC__ @@ -19,12 +20,8 @@ #endif
#if !defined(DBG) || !defined(YDEBUG) -#ifdef __GNUC__ -#define DPRINT(args...) +#define DPRINT(...) do { DbgPrint(__VA_ARGS__); } while(0) #else -#define DPRINT -#endif -#else #define DPRINT DbgPrint("(%s:%d:%s) ",__FILE__,__LINE__,__FUNCTION__), DbgPrint #endif
@@ -52,6 +49,24 @@ inline static const char *debugres_a( const char *s ) { return wine_dbgstr_an( s, 80 ); } inline static const char *debugres_w( const wchar_t *s ) { return wine_dbgstr_wn( s, 80 ); }
+static inline const char *wine_dbgstr_point( const POINT *pt ) +{ + if (!pt) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)", pt->x, pt->y ); +} + +static inline const char *wine_dbgstr_size( const SIZE *size ) +{ + if (!size) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)", size->cx, size->cy ); +} + +static inline const char *wine_dbgstr_rect( const RECT *rect ) +{ + if (!rect) return "(null)"; + return wine_dbg_sprintf( "(%ld,%ld)-(%ld,%ld)", rect->left, rect->top, rect->right, rect->bottom ); +} + #define TRACE DPRINT #define TRACE_(ch) DPRINT #ifdef NDEBUG _____
Modified: trunk/reactos/lib/dbghelp/stack.c --- trunk/reactos/lib/dbghelp/stack.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/dbghelp/stack.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -39,7 +39,6 @@
enum st_mode {stm_start, stm_32bit, stm_16bit, stm_done};
-#if 0 static const char* wine_dbgstr_addr(const ADDRESS* addr) { if (!addr) return "(null)"; @@ -57,7 +56,6 @@ return "unknown"; } } -#endif
/* indexes in Reserved array */ #define __CurrentMode 0 _____
Modified: trunk/reactos/lib/kernel32/misc/lcformat.c --- trunk/reactos/lib/kernel32/misc/lcformat.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/kernel32/misc/lcformat.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -33,9 +33,8 @@
#include <k32.h>
#include "wine/config.h" -//#include "wine/port.h" -#include "wine/debug.h" #include "wine/unicode.h" +#include "wine/debug.h"
WINE_DEFAULT_DEBUG_CHANNEL(nls); @@ -140,7 +139,7 @@ TRACE( #type ": %ld (%08lx)\n", (DWORD)num, (DWORD)num)
#define GET_LOCALE_STRING(str, type) str = NLS_GetLocaleString(lcid, type|dwFlags); \ - TRACE( #type ": '%s'\n", debugstr_w(str)) + TRACE( #type ": '%S'\n", (str))
/*********************************************************************** *** * NLS_GetFormats <internal> @@ -654,7 +653,7 @@ } cchWritten++; /* Include terminating NUL */
- TRACE("returning length=%d, ouput='%s'\n", cchWritten, debugstr_w(lpStr)); + TRACE("returning length=%d, ouput='%S'\n", cchWritten, lpStr); return cchWritten;
NLS_GetDateTimeFormatW_Overrun: @@ -677,7 +676,7 @@ INT iRet;
TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpStr, cchOut); + lpFormat, lpStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid)) { @@ -762,7 +761,7 @@ LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut) { TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpDateStr, cchOut); + lpFormat, lpDateStr, cchOut);
return NLS_GetDateTimeFormatA(lcid, dwFlags | DATE_DATEVARSONLY, lpTime, lpFormat, lpDateStr, cchOut); @@ -777,8 +776,8 @@ INT WINAPI GetDateFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCWSTR lpFormat, LPWSTR lpDateStr, INT cchOut) { - TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n", lcid, dwFlags, lpTime, - debugstr_w(lpFormat), lpDateStr, cchOut); + TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n", lcid, dwFlags, lpTime, + lpFormat, lpDateStr, cchOut);
return NLS_GetDateTimeFormatW(lcid, dwFlags|DATE_DATEVARSONLY, lpTime, lpFormat, lpDateStr, cchOut); @@ -829,7 +828,7 @@ LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut) { TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_a(lpFormat), lpTimeStr, cchOut); + lpFormat, lpTimeStr, cchOut);
return NLS_GetDateTimeFormatA(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime, lpFormat, lpTimeStr, cchOut); @@ -843,8 +842,8 @@ INT WINAPI GetTimeFormatW(LCID lcid, DWORD dwFlags, const SYSTEMTIME* lpTime, LPCWSTR lpFormat, LPWSTR lpTimeStr, INT cchOut) { - TRACE("(0x%04lx,0x%08lx,%p,%s,%p,%d)\n",lcid, dwFlags, lpTime, - debugstr_w(lpFormat), lpTimeStr, cchOut); + TRACE("(0x%04lx,0x%08lx,%p,%S,%p,%d)\n",lcid, dwFlags, lpTime, + lpFormat, lpTimeStr, cchOut);
return NLS_GetDateTimeFormatW(lcid, dwFlags|TIME_TIMEVARSONLY, lpTime, lpFormat, lpTimeStr, cchOut); @@ -887,7 +886,7 @@ const NUMBERFMTW *pfmt = NULL; INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue), + TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpNumberStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid)) @@ -966,7 +965,7 @@ DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0; INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), + TRACE("(0x%04lx,0x%08lx,%S,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpNumberStr, cchOut);
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpNumberStr) || @@ -1227,7 +1226,7 @@ const CURRENCYFMTW *pfmt = NULL; INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_a(lpszValue), + TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpCurrencyStr, cchOut);
if (NLS_IsUnicodeOnlyLcid(lcid)) @@ -1332,7 +1331,7 @@ DWORD dwState = 0, dwDecimals = 0, dwGroupCount = 0, dwCurrentGroupCount = 0, dwFmt; INT iRet;
- TRACE("(0x%04lx,0x%08lx,%s,%p,%p,%d)\n", lcid, dwFlags, debugstr_w(lpszValue), + TRACE("(0x%04lx,0x%08lx,%S,%p,%p,%d)\n", lcid, dwFlags, lpszValue, lpFormat, lpCurrencyStr, cchOut);
if (!lpszValue || cchOut < 0 || (cchOut > 0 && !lpCurrencyStr) || _____
Modified: trunk/reactos/lib/msvideo/msvfw32.xml --- trunk/reactos/lib/msvideo/msvfw32.xml 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/msvideo/msvfw32.xml 2005-07-13 01:41:13 UTC (rev 16549) @@ -13,6 +13,7 @@
<library>comctl32</library> <library>kernel32</library> <library>ntdll</library> + <library>wine</library> <file>drawdib.c</file> <file>mciwnd.c</file> <file>msvfw32.rc</file> _____
Modified: trunk/reactos/lib/shell32/shellord.c --- trunk/reactos/lib/shell32/shellord.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/shell32/shellord.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -965,8 +965,8 @@
IShellView * psf; HRESULT hRes;
- TRACE("sf=%p pidl=%p cb=%p mode=0x%08x parm=%p\n", - psvcbi->pshf, psvcbi->pidl, psvcbi->pfnCallback, + TRACE("sf=%p cb=%p mode=0x%08x parm=%p\n", + psvcbi->pshf, psvcbi->pfnCallback, psvcbi->fvm, psvcbi->psvOuter);
psf = IShellView_Constructor(psvcbi->pshf); _____
Modified: trunk/reactos/lib/user32/controls/combo.c --- trunk/reactos/lib/user32/controls/combo.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/user32/controls/combo.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -1829,8 +1829,8 @@
{ LPHEADCOMBO lphc = (LPHEADCOMBO)GetWindowLongA( hwnd, 0 );
- TRACE("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam ); + //TRACE("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(message, hwnd), wParam, lParam );
if( lphc || message == WM_NCCREATE ) switch(message) _____
Modified: trunk/reactos/lib/user32/controls/edit.c --- trunk/reactos/lib/user32/controls/edit.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/user32/controls/edit.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -433,7 +433,7 @@
EDITSTATE *es = (EDITSTATE *)GetWindowLongW( hwnd, 0 ); LRESULT result = 0;
- TRACE("hwnd=%p msg=%x (%s) wparam=%x lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam); + //TRACE("hwnd=%p msg=%x (%s) wparam=%x lparam=%lx\n", hwnd, msg, SPY_GetMsgName(msg, hwnd), wParam, lParam);
if (!es && msg != WM_NCCREATE) return DefWindowProcT(hwnd, msg, wParam, lParam, unicode); _____
Modified: trunk/reactos/lib/user32/controls/listbox.c --- trunk/reactos/lib/user32/controls/listbox.c 2005-07-13 00:11:11 UTC (rev 16548) +++ trunk/reactos/lib/user32/controls/listbox.c 2005-07-13 01:41:13 UTC (rev 16549) @@ -2565,8 +2565,8 @@
DefWindowProcA( hwnd, msg, wParam, lParam ); }
- TRACE("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); + //TRACE("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); switch(msg) { #ifndef __REACTOS__ @@ -3206,8 +3206,8 @@ DefWindowProcA( hwnd, msg, wParam, lParam ); }
- TRACE_(combo)("[%p]: msg %s wp %08x lp %08lx\n", - hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam ); + //TRACE_(combo)("[%p]: msg %s wp %08x lp %08lx\n", + // hwnd, SPY_GetMsgName(msg, hwnd), wParam, lParam );
if ((lphc = descr->lphc) != NULL) {