Fix compiler warnings with gcc-4.2.0
Commit Message
Hi there!
This patch fixes a compiler warning gcc-4.2.0 now prints. This is about
assigning constant strings to non-const char variables.
Matthias
===================================================================
@@ -61,7 +61,7 @@ const char *LanguageCodeList[] = {
NULL
};
-static char *I18nLocaleDir = LOCDIR;
+static const char *I18nLocaleDir = LOCDIR;
static cStringList LanguageLocales;
static cStringList LanguageNames;
===================================================================
@@ -82,7 +82,7 @@ enum eKeys { // "Up" and "Down" must be
struct tKey {
eKeys type;
- char *name;
+ const char *name;
};
class cKey : public cListObject {
===================================================================
@@ -1040,7 +1040,7 @@ int cMenuScheduleItem::Compare(const cLi
return r;
}
-static char *TimerMatchChars = " tT";
+static const char *TimerMatchChars = " tT";
bool cMenuScheduleItem::Update(bool Force)
{
===================================================================
@@ -257,7 +257,7 @@ void cRcuRemote::SetNumber(int n, bool H
data = m;
}
-void cRcuRemote::SetString(char *s)
+void cRcuRemote::SetString(const char *s)
{
const char *chars = mode == modeH ? "0123456789ABCDEF" : "0123456789-EHLP ";
int n = 0;
===================================================================
@@ -31,7 +31,7 @@ private:
void SetMode(unsigned char Mode);
void SetNumber(int n, bool Hex = false);
void SetPoints(unsigned char Dp, bool On);
- void SetString(char *s);
+ void SetString(const char *s);
bool DetectCode(unsigned char *Code);
virtual void Action(void);
virtual void ChannelSwitch(const cDevice *Device, int ChannelNumber);
===================================================================
@@ -416,7 +416,7 @@ bool cPipe::Open(const char *Command, co
return false;
}
- char *mode = "w";
+ const char *mode = "w";
int iopipe = 0;
if (pid > 0) { // parent process