Author: cwittich Date: Fri Jan 19 12:26:20 2007 New Revision: 25528
URL: http://svn.reactos.org/svn/reactos?rev=25528&view=rev Log: fix some gcc 4.2 compilation problems and warnings
Modified: trunk/reactos/base/applications/ibrowser/mainframe.cpp trunk/reactos/base/applications/ibrowser/utility/utility.h trunk/reactos/base/applications/ibrowser/webchild.cpp trunk/reactos/base/shell/explorer/dialogs/searchprogram.cpp trunk/reactos/base/shell/explorer/shell/mainframe.cpp trunk/reactos/base/shell/explorer/shell/ntobjfs.cpp trunk/reactos/base/shell/explorer/shell/webchild.cpp trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp trunk/reactos/base/shell/explorer/utility/utility.h trunk/reactos/include/psdk/windef.h
Modified: trunk/reactos/base/applications/ibrowser/mainframe.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/ibrowser/... ============================================================================== --- trunk/reactos/base/applications/ibrowser/mainframe.cpp (original) +++ trunk/reactos/base/applications/ibrowser/mainframe.cpp Fri Jan 19 12:26:20 2007 @@ -149,14 +149,16 @@ rbBand.cyMaxChild = 0; rbBand.cyIntegral = btn_hgt;
- rbBand.lpText = TEXT("Toolbar"); + TCHAR ToolBarText[] = _T("Toolbar"); + rbBand.lpText = ToolBarText; rbBand.hwndChild = _htoolbar; rbBand.cxMinChild = 0; rbBand.cyMinChild = btn_hgt + 4; rbBand.cx = 182; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
- rbBand.lpText = TEXT("Address"); + TCHAR AddressText[] = _T("Address"); + rbBand.lpText = AddressText; rbBand.hwndChild = _haddressedit; rbBand.cxMinChild = 0; rbBand.cyMinChild = btn_hgt - 2;
Modified: trunk/reactos/base/applications/ibrowser/utility/utility.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/ibrowser/... ============================================================================== --- trunk/reactos/base/applications/ibrowser/utility/utility.h (original) +++ trunk/reactos/base/applications/ibrowser/utility/utility.h Fri Jan 19 12:26:20 2007 @@ -25,6 +25,10 @@ // Martin Fuchs, 23.07.2003 //
+ // STL headers for strings and streams +#include <string> +#include <iostream> +using namespace std;
// standard windows headers #define WIN32_LEAN_AND_MEAN @@ -154,11 +158,6 @@ #ifdef _MSC_VER #pragma warning(disable: 4786) // disable warnings about too long debug information symbols #endif - - // STL headers for strings and streams -#include <string> -#include <iostream> -using namespace std;
// containers #include <map>
Modified: trunk/reactos/base/applications/ibrowser/webchild.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/ibrowser/... ============================================================================== --- trunk/reactos/base/applications/ibrowser/webchild.cpp (original) +++ trunk/reactos/base/applications/ibrowser/webchild.cpp Fri Jan 19 12:26:20 2007 @@ -133,7 +133,7 @@ else { _new_url = url;
- _browser->Navigate(L"about:blank", NULL, NULL, NULL, NULL); + _browser->Navigate(BStr(L"about:blank"), NULL, NULL, NULL, NULL); } }
Modified: trunk/reactos/base/shell/explorer/dialogs/searchprogram.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/dialogs... ============================================================================== --- trunk/reactos/base/shell/explorer/dialogs/searchprogram.cpp (original) +++ trunk/reactos/base/shell/explorer/dialogs/searchprogram.cpp Fri Jan 19 12:26:20 2007 @@ -107,15 +107,18 @@
LV_COLUMN column = {LVCF_FMT|LVCF_WIDTH|LVCF_TEXT, LVCFMT_LEFT, 250};
- column.pszText = _T("Name"); + TCHAR lvColName[] = _T("Name"); + column.pszText = lvColName; ListView_InsertColumn(_list_ctrl, 0, &column);
column.cx = 300; - column.pszText = _T("Path"); + TCHAR lvColPath[] = _T("Path"); + column.pszText = lvColPath; ListView_InsertColumn(_list_ctrl, 1, &column);
column.cx = 400; - column.pszText = _T("Menu Path"); + TCHAR lvColMenuPath[] = _T("Menu Path"); + column.pszText = lvColMenuPath; ListView_InsertColumn(_list_ctrl, 2, &column);
ListView_SetExtendedListViewStyleEx(_list_ctrl, LVS_EX_FULLROWSELECT, LVS_EX_FULLROWSELECT);
Modified: trunk/reactos/base/shell/explorer/shell/mainframe.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/m... ============================================================================== --- trunk/reactos/base/shell/explorer/shell/mainframe.cpp (original) +++ trunk/reactos/base/shell/explorer/shell/mainframe.cpp Fri Jan 19 12:26:20 2007 @@ -865,7 +865,8 @@ #endif rbBand.fStyle = RBBS_CHILDEDGE|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
- rbBand.lpText = TEXT("Extras"); + TCHAR ExtrasBand[] = _T("Extras"); + rbBand.lpText = ExtrasBand; rbBand.hwndChild = _hextrabar; rbBand.cxMinChild = 0; rbBand.cyMinChild = btn_hgt; @@ -874,7 +875,8 @@
#ifndef _NO_WIN_FS rbBand.fStyle |= RBBS_BREAK; - rbBand.lpText = TEXT("Drives"); + TCHAR DrivesBand[] = _T("Drives"); + rbBand.lpText = DrivesBand; rbBand.hwndChild = _hdrivebar; rbBand.cxMinChild = 0; rbBand.cyMinChild = btn_hgt;
Modified: trunk/reactos/base/shell/explorer/shell/ntobjfs.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/n... ============================================================================== --- trunk/reactos/base/shell/explorer/shell/ntobjfs.cpp (original) +++ trunk/reactos/base/shell/explorer/shell/ntobjfs.cpp Fri Jan 19 12:26:20 2007 @@ -230,12 +230,14 @@ if (info->name.string_ptr) { info->name.string_ptr[info->name.string_len / sizeof(WCHAR)] = 0; } else { - info->name.string_ptr = TEXT(""); + TCHAR empty_string_ptr[] = _T(""); + info->name.string_ptr = empty_string_ptr; } if (info->type.string_ptr) { info->type.string_ptr[info->type.string_len / sizeof(WCHAR)] = 0; } else { - info->type.string_ptr = TEXT(""); + TCHAR empty_string_ptr[] = _T(""); + info->type.string_ptr = empty_string_ptr; } lstrcpynW(p, info->name.string_ptr, COUNTOF(buffer)); #else
Modified: trunk/reactos/base/shell/explorer/shell/webchild.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/w... ============================================================================== --- trunk/reactos/base/shell/explorer/shell/webchild.cpp (original) +++ trunk/reactos/base/shell/explorer/shell/webchild.cpp Fri Jan 19 12:26:20 2007 @@ -133,7 +133,7 @@ else { _new_url = url;
- _browser->Navigate(L"about:blank", NULL, NULL, NULL, NULL); + _browser->Navigate(BStr(L"about:blank"), NULL, NULL, NULL, NULL); } }
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskbar... ============================================================================== --- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp (original) +++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp Fri Jan 19 12:26:20 2007 @@ -148,13 +148,15 @@ rbBand.cxMinChild = rbBand.cyIntegral * 3; rbBand.fStyle = RBBS_VARIABLEHEIGHT|RBBS_GRIPPERALWAYS|RBBS_HIDETITLE;
- rbBand.lpText = TEXT("Quicklaunch"); + TCHAR QuickLaunchBand[] = _T("Quicklaunch"); + rbBand.lpText = QuickLaunchBand; rbBand.hwndChild = _hwndQuickLaunch; rbBand.cx = 250; rbBand.wID = IDW_QUICKLAUNCHBAR; SendMessage(_hwndrebar, RB_INSERTBAND, (WPARAM)-1, (LPARAM)&rbBand);
- rbBand.lpText = TEXT("Taskbar"); + TCHAR TaskbarBand[] = _T("Taskbar"); + rbBand.lpText = TaskbarBand; rbBand.hwndChild = _hwndTaskBar; rbBand.cx = 200; //pcs->cx-_taskbar_pos-quicklaunch_width-(notifyarea_width+1); rbBand.wID = IDW_TASKTOOLBAR;
Modified: trunk/reactos/base/shell/explorer/utility/utility.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utility... ============================================================================== --- trunk/reactos/base/shell/explorer/utility/utility.h (original) +++ trunk/reactos/base/shell/explorer/utility/utility.h Fri Jan 19 12:26:20 2007 @@ -26,6 +26,12 @@ //
+ // STL headers for strings and streams +#include <string> +#include <iostream> +using namespace std; + + // standard windows headers #define WIN32_LEAN_AND_MEAN #define WIN32_EXTRA_LEAN @@ -193,11 +199,6 @@ #ifdef _MSC_VER #pragma warning(disable: 4786) // disable warnings about too long debug information symbols #endif - - // STL headers for strings and streams -#include <string> -#include <iostream> -using namespace std;
// containers #include <map>
Modified: trunk/reactos/include/psdk/windef.h URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/psdk/windef.h?rev=2... ============================================================================== --- trunk/reactos/include/psdk/windef.h (original) +++ trunk/reactos/include/psdk/windef.h Fri Jan 19 12:26:20 2007 @@ -123,8 +123,8 @@ #endif /* __GNUC__/__WATCOMC__ */ #define MAKEWORD(a,b) ((WORD)(((BYTE)(a))|(((WORD)((BYTE)(b)))<<8))) #define MAKELONG(a,b) ((LONG)(((WORD)(a))|(((DWORD)((WORD)(b)))<<16))) -#define LOWORD(l) ((WORD)((DWORD)(l))) -#define HIWORD(l) ((WORD)(((DWORD)(l)>>16)&0xFFFF)) +#define LOWORD(l) ((WORD)((DWORD_PTR)(l))) +#define HIWORD(l) ((WORD)(((DWORD_PTR)(l)>>16)&0xFFFF)) #define LOBYTE(w) ((BYTE)(w)) #define HIBYTE(w) ((BYTE)(((WORD)(w)>>8)&0xFF))