Author: sginsberg
Date: Sun Aug 30 17:35:14 2009
New Revision: 42968
URL:
http://svn.reactos.org/svn/reactos?rev=42968&view=rev
Log:
- Fix gdb2 and regexpl warnings under gcc 4.4.0
Modified:
trunk/rosapps/applications/devutils/gdb2/gdb2.cpp
trunk/rosapps/applications/sysutils/regexpl/Console.cpp
trunk/rosapps/applications/sysutils/regexpl/Console.h
trunk/rosapps/applications/sysutils/regexpl/RegistryKey.cpp
trunk/rosapps/applications/sysutils/regexpl/RegistryTree.cpp
trunk/rosapps/applications/sysutils/regexpl/ShellCommandDeleteValue.cpp
trunk/rosapps/applications/sysutils/regexpl/ShellCommandSetValue.cpp
trunk/rosapps/applications/sysutils/regexpl/ShellCommandValue.cpp
Modified: trunk/rosapps/applications/devutils/gdb2/gdb2.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/devutils/gdb2…
==============================================================================
--- trunk/rosapps/applications/devutils/gdb2/gdb2.cpp [iso-8859-1] (original)
+++ trunk/rosapps/applications/devutils/gdb2/gdb2.cpp [iso-8859-1] Sun Aug 30 17:35:14
2009
@@ -177,6 +177,7 @@
{
PROCESS_INFORMATION pi;
STARTUPINFO si;
+ static CHAR Title[] = "debugged program console";
// Set up the start up info struct.
ZeroMemory(&si,sizeof(STARTUPINFO));
@@ -185,7 +186,7 @@
si.hStdOutput = hChildStdOut;
si.hStdInput = hChildStdIn;
si.hStdError = hChildStdErr;
- si.lpTitle = "debugged program console";
+ si.lpTitle = Title;
// Use this if you want to hide the child:
// si.wShowWindow = SW_HIDE;
// Note that dwFlags must include STARTF_USESHOWWINDOW if you want to
Modified: trunk/rosapps/applications/sysutils/regexpl/Console.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/Console.cpp [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/regexpl/Console.cpp [iso-8859-1] Sun Aug 30
17:35:14 2009
@@ -220,7 +220,7 @@
return TAB_WIDTH;
}
-BOOL CConsole::SetTitle(TCHAR *p)
+BOOL CConsole::SetTitle(const TCHAR *p)
{
return SetConsoleTitle(p);
}
@@ -640,7 +640,7 @@
m_pchBuffer[dwLastCharOffset] = 0; // terminate string in buffer
ret = Write(m_pchBuffer);
m_History.AddHistoryLine(m_pchBuffer);
- TCHAR *strLF = _T("\n");
+ static TCHAR strLF[] = _T("\n");
ret = Write(strLF);
break;
}
@@ -1008,7 +1008,7 @@
m_Lines = 0;
}
-BOOL CConsole::WriteString(TCHAR *pchString, COORD Position)
+BOOL CConsole::WriteString(const TCHAR *pchString, COORD Position)
{
CHAR_INFO ciBuffer[256];
int nSize = _tcslen(pchString);
Modified: trunk/rosapps/applications/sysutils/regexpl/Console.h
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/Console.h [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/regexpl/Console.h [iso-8859-1] Sun Aug 30 17:35:14
2009
@@ -25,7 +25,7 @@
// BOOL SetInputMode(DWORD dwMode);
BOOL SetTextAttribute(WORD wAttributes);
BOOL GetTextAttribute(WORD& rwAttributes);
- BOOL SetTitle(TCHAR *p);
+ BOOL SetTitle(const TCHAR *p);
BOOL Write(const TCHAR *p, DWORD dwChars = 0);
CConsole();
virtual ~CConsole();
@@ -38,7 +38,7 @@
COORD m_BufferSize;
WORD m_wAttributes;
SHORT m_Lines;
- BOOL WriteString(TCHAR *pchString, COORD Position);
+ BOOL WriteString(const TCHAR *pchString, COORD Position);
BOOL WriteChar(TCHAR ch);
BOOL m_blnInsetMode; // TRUE - insert, FALSE - overwrite
DWORD m_dwInsertModeCursorHeight;
Modified: trunk/rosapps/applications/sysutils/regexpl/RegistryKey.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/RegistryKey.cpp [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/regexpl/RegistryKey.cpp [iso-8859-1] Sun Aug 30
17:35:14 2009
@@ -27,7 +27,7 @@
#include "ph.h"
#include "RegistryKey.h"
-static TCHAR *g_ppszHiveNames[] =
+static const TCHAR *g_ppszHiveNames[] =
{
_T("HKEY_CLASSES_ROOT"),
_T("HKEY_CURRENT_USER"),
Modified: trunk/rosapps/applications/sysutils/regexpl/RegistryTree.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/RegistryTree.cpp [iso-8859-1] (original)
+++ trunk/rosapps/applications/sysutils/regexpl/RegistryTree.cpp [iso-8859-1] Sun Aug 30
17:35:14 2009
@@ -95,7 +95,7 @@
GotoRoot(); // This is full absolute path.
// split path to key names.
- TCHAR *pszSeps = _T("\\");
+ const TCHAR *pszSeps = _T("\\");
// Make buffer and copy relative path into it.
TCHAR *pszBuffer = new TCHAR[_tcslen(pszRelativePath)+1];
@@ -124,7 +124,7 @@
}
}
- TCHAR *pszNewKey = _tcstok(pszBuffer,pszSeps);
+ const TCHAR *pszNewKey = _tcstok(pszBuffer,pszSeps);
if ((!pszNewKey)&&((*pszRelativePath != _T('\\'))||(*(pszRelativePath+1)
!= 0)))
{
Modified: trunk/rosapps/applications/sysutils/regexpl/ShellCommandDeleteValue.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/ShellCommandDeleteValue.cpp [iso-8859-1]
(original)
+++ trunk/rosapps/applications/sysutils/regexpl/ShellCommandDeleteValue.cpp [iso-8859-1]
Sun Aug 30 17:35:14 2009
@@ -93,6 +93,7 @@
CRegistryKey Key;
TCHAR *pszValueNamePattern;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
@@ -115,7 +116,7 @@
}
else
{
- pszValueNamePattern = _T("");
+ pszValueNamePattern = (TCHAR*)pszEmpty;
pszPath = _T(".");
}
Modified: trunk/rosapps/applications/sysutils/regexpl/ShellCommandSetValue.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/ShellCommandSetValue.cpp [iso-8859-1]
(original)
+++ trunk/rosapps/applications/sysutils/regexpl/ShellCommandSetValue.cpp [iso-8859-1] Sun
Aug 30 17:35:14 2009
@@ -209,6 +209,7 @@
CRegistryKey Key;
TCHAR *pszValueName;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
@@ -241,7 +242,7 @@
}
else
{
- pszValueName = _T("");
+ pszValueName = (TCHAR*)pszEmpty;
pszPath = _T(".");
}
Modified: trunk/rosapps/applications/sysutils/regexpl/ShellCommandValue.cpp
URL:
http://svn.reactos.org/svn/reactos/trunk/rosapps/applications/sysutils/rege…
==============================================================================
--- trunk/rosapps/applications/sysutils/regexpl/ShellCommandValue.cpp [iso-8859-1]
(original)
+++ trunk/rosapps/applications/sysutils/regexpl/ShellCommandValue.cpp [iso-8859-1] Sun Aug
30 17:35:14 2009
@@ -122,6 +122,7 @@
CRegistryKey Key;
TCHAR *pchValueName;
+ const TCHAR *pszEmpty = _T("");
const TCHAR *pszPath;
if (blnHelp)
@@ -154,7 +155,7 @@
}
else
{
- pchValueName = _T("");
+ pchValueName = (TCHAR*)pszEmpty;
pszPath = _T(".");
}