Author: cwittich
Date: Fri Jan 25 16:26:12 2008
New Revision: 31988
URL:
http://svn.reactos.org/svn/reactos?rev=31988&view=rev
Log:
fix some warnings
Modified:
trunk/reactos/base/shell/explorer/shell/filechild.cpp
trunk/reactos/base/shell/explorer/shell/pane.cpp
trunk/reactos/base/shell/explorer/shell/shellfs.cpp
trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp
trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp
trunk/reactos/base/shell/explorer/taskbar/traynotify.cpp
trunk/reactos/base/shell/explorer/utility/xmlstorage.cpp
trunk/reactos/base/shell/explorer/utility/xs-native.cpp
Modified: trunk/reactos/base/shell/explorer/shell/filechild.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/…
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/filechild.cpp (original)
+++ trunk/reactos/base/shell/explorer/shell/filechild.cpp Fri Jan 25 16:26:12 2008
@@ -299,10 +299,12 @@
SetWindowText(_hwnd, _path);
if (_path[0])
+ {
if (SetCurrentDirectory(_path))
set_url(_path); //set_url(FmtString(TEXT("file://%s"), _path));
else
_path[0] = TEXT('\0');
+ }
}
@@ -508,8 +510,9 @@
case WM_CONTEXTMENU: {
// first select the current item in the listbox
HWND hpanel = (HWND) wparam;
- const POINTS& pos = MAKEPOINTS(lparam);
- POINT pt; POINTSTOPOINT(pt, pos);
+ POINT pt;
+ pt.x = LOWORD(lparam);
+ pt.y = HIWORD(lparam);
POINT pt_screen = pt;
ScreenToClient(hpanel, &pt);
SendMessage(hpanel, WM_LBUTTONDOWN, 0, MAKELONG(pt.x, pt.y));
Modified: trunk/reactos/base/shell/explorer/shell/pane.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/…
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/pane.cpp (original)
+++ trunk/reactos/base/shell/explorer/shell/pane.cpp Fri Jan 25 16:26:12 2008
@@ -377,12 +377,13 @@
bool following_child =
(up->_next->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)!=0; // a
directory?
if (!following_child)
+ {
for(Entry*n=up->_next; n; n=n->_next)
if (n->_down) { // any file with NTFS sub-streams?
following_child = true;
break;
}
-
+ }
if (following_child)
#endif
{
@@ -403,12 +404,13 @@
bool following_child =
(entry->_next->_data.dwFileAttributes&FILE_ATTRIBUTE_DIRECTORY)!=0; // a
directory?
if (!following_child)
+ {
for(Entry*n=entry->_next; n; n=n->_next)
if (n->_down) { // any file with NTFS sub-streams?
following_child = true;
break;
}
-
+ }
if (following_child)
#endif
LineTo(dis->hDC, x, dis->rcItem.bottom);
Modified: trunk/reactos/base/shell/explorer/shell/shellfs.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/shell/…
==============================================================================
--- trunk/reactos/base/shell/explorer/shell/shellfs.cpp (original)
+++ trunk/reactos/base/shell/explorer/shell/shellfs.cpp Fri Jan 25 16:26:12 2008
@@ -122,6 +122,7 @@
CONTEXT("ShellEntry::create_absolute_pidl()");
if (_up)
+ {
if (_up->_etype == ET_SHELL) {
ShellDirectory* dir = static_cast<ShellDirectory*>(_up);
@@ -129,7 +130,7 @@
return _pidl.create_absolute_pidl(dir->create_absolute_pidl());
} else
return _pidl.create_absolute_pidl(_up->create_absolute_pidl());
-
+ }
return _pidl;
}
Modified: trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp (original)
+++ trunk/reactos/base/shell/explorer/taskbar/desktopbar.cpp Fri Jan 25 16:26:12 2008
@@ -314,9 +314,12 @@
return ProcessCopyData((COPYDATASTRUCT*)lparam);
case WM_CONTEXTMENU: {
+ POINTS p;
+ p.x = LOWORD(lparam);
+ p.y = HIWORD(lparam);
PopupMenu menu(IDM_DESKTOPBAR);
SetMenuDefaultItem(menu, 0, MF_BYPOSITION);
- menu.TrackPopupMenu(_hwnd, MAKEPOINTS(lparam));
+ menu.TrackPopupMenu(_hwnd, p);
break;}
case PM_GET_LAST_ACTIVE:
Modified: trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp (original)
+++ trunk/reactos/base/shell/explorer/taskbar/startmenu.cpp Fri Jan 25 16:26:12 2008
@@ -311,7 +311,9 @@
break;
case WM_MOVE: {
- const POINTS& pos = MAKEPOINTS(lparam);
+ POINTS pos;
+ pos.x = LOWORD(lparam);
+ pos.y = HIWORD(lparam);
// move open submenus of floating menus
if (_submenu) {
@@ -699,10 +701,12 @@
int idx = GetSelectionIndex();
if (idx == -1)
+ {
if (step > 0)
idx = 0 - step;
else
idx = _buttons.size() - step;
+ }
for(;;) {
idx += step;
@@ -1067,10 +1071,12 @@
{
// search for an already existing subdirectory entry with the same name
if (entry->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY)
+ {
for(ShellEntryMap::iterator it=_entries.begin(); it!=_entries.end(); ++it) {
StartMenuEntry& sme = it->second;
if (!_tcsicmp(sme._title, title)) ///@todo speed up by using a map indexed by name
+ {
for(ShellEntrySet::iterator it2=sme._entries.begin(); it2!=sme._entries.end(); ++it2)
{
if ((*it2)->_data.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) {
// merge the new shell entry with the existing of the same name
@@ -1079,7 +1085,9 @@
return it;
}
}
- }
+ }
+ }
+ }
ShellEntryMap::iterator sme = AddEntry(title, icon_id);
Modified: trunk/reactos/base/shell/explorer/taskbar/traynotify.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/taskba…
==============================================================================
--- trunk/reactos/base/shell/explorer/taskbar/traynotify.cpp (original)
+++ trunk/reactos/base/shell/explorer/taskbar/traynotify.cpp Fri Jan 25 16:26:12 2008
@@ -419,6 +419,9 @@
case WM_CONTEXTMENU: {
Point pt(lparam);
+ POINTS p;
+ p.x = pt.x;
+ p.y = pt.y;
ScreenToClient(_hwnd, &pt);
if (IconHitTest(pt) == _sorted_icons.end()) { // display menu only when no icon
clicked
@@ -426,7 +429,7 @@
SetMenuDefaultItem(menu, 0, MF_BYPOSITION);
CheckMenuItem(menu, ID_SHOW_HIDDEN_ICONS,
MF_BYCOMMAND|(_show_hidden?MF_CHECKED:MF_UNCHECKED));
CheckMenuItem(menu, ID_SHOW_ICON_BUTTON,
MF_BYCOMMAND|(_show_button?MF_CHECKED:MF_UNCHECKED));
- menu.TrackPopupMenu(_hwnd, MAKEPOINTS(lparam));
+ menu.TrackPopupMenu(_hwnd, p);
}
break;}
Modified: trunk/reactos/base/shell/explorer/utility/xmlstorage.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utilit…
==============================================================================
--- trunk/reactos/base/shell/explorer/utility/xmlstorage.cpp (original)
+++ trunk/reactos/base/shell/explorer/utility/xmlstorage.cpp Fri Jan 25 16:26:12 2008
@@ -705,6 +705,7 @@
break;
if (p != s)
+ {
if (_pos->_children.empty()) { // no children in last node?
if (_last_tag == TAG_START)
_pos->_content.append(s, p-s);
@@ -714,7 +715,7 @@
p = s;
} else
_pos->_children.back()->_trailing.append(s, p-s);
-
+ }
std::string leading;
if (p != e)
@@ -752,12 +753,14 @@
}
if (p != s)
+ {
if (_pos->_children.empty()) // no children in current node?
_pos->_content.append(s, p-s);
else if (_last_tag == TAG_START)
_pos->_content.append(s, p-s);
else
_pos->_children.back()->_trailing.append(s, p-s);
+ }
if (p != e)
_pos->_end_leading.assign(p, e-p);
Modified: trunk/reactos/base/shell/explorer/utility/xs-native.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/explorer/utilit…
==============================================================================
--- trunk/reactos/base/shell/explorer/utility/xs-native.cpp (original)
+++ trunk/reactos/base/shell/explorer/utility/xs-native.cpp Fri Jan 25 16:26:12 2008
@@ -361,6 +361,7 @@
for(;;) {
// check for the encoding of the first line end
if (!_endl_defined)
+ {
if (c == '\n') {
_format._endl = "\n";
_endl_defined = true;
@@ -368,7 +369,7 @@
_format._endl = "\r\n";
_endl_defined = true;
}
-
+ }
c = get();
if (c == EOF)