fix deprecated conversion from string constant to char* by using const char* instead...
authorAndreas Oberritter <obi@opendreambox.org>
Tue, 25 Mar 2008 22:57:37 +0000 (22:57 +0000)
committerAndreas Oberritter <obi@opendreambox.org>
Tue, 25 Mar 2008 22:57:37 +0000 (22:57 +0000)
lib/base/init.h
lib/driver/avswitch.cpp
lib/dvb/epgcache.cpp
lib/gui/evideo.cpp

index 6ffd04c..4b40bea 100644 (file)
@@ -27,9 +27,9 @@ class eAutoInit
        virtual void closeNow()=0;
 protected:
        int rl;
        virtual void closeNow()=0;
 protected:
        int rl;
-       char *description;
+       const char *description;
 public:
 public:
-       eAutoInit(int rl, char *description): rl(rl), description(description)
+       eAutoInit(int rl, const char *description): rl(rl), description(description)
        {
        }
        virtual ~eAutoInit();
        {
        }
        virtual ~eAutoInit();
@@ -54,7 +54,7 @@ public:
        {
                return t;
        }
        {
                return t;
        }
-       eAutoInitP1(const T2 &arg, int runl, char *description): eAutoInit(runl, description), arg(arg)
+       eAutoInitP1(const T2 &arg, int runl, const char *description): eAutoInit(runl, description), arg(arg)
        {
                eInit::add(rl, this);
        }
        {
                eInit::add(rl, this);
        }
@@ -85,7 +85,7 @@ public:
        {
                return t;
        }
        {
                return t;
        }
-       eAutoInitP0(int runl, char *description): eAutoInit(runl, description)
+       eAutoInitP0(int runl, const char *description): eAutoInit(runl, description)
        {
                eInit::add(rl, this);
        }
        {
                eInit::add(rl, this);
        }
@@ -116,7 +116,7 @@ public:
        {
                return t;
        }
        {
                return t;
        }
-       eAutoInitPtr(int runl, char *description): eAutoInit(runl, description)
+       eAutoInitPtr(int runl, const char *description): eAutoInit(runl, description)
        {
                eInit::add(rl, this);
        }
        {
                eInit::add(rl, this);
        }
index a936aa5..0fc53da 100644 (file)
@@ -103,7 +103,7 @@ void eAVSwitch::setInput(int val)
        2-aux
        */
 
        2-aux
        */
 
-       char *input[] = {"encoder", "scart", "aux"};
+       const char *input[] = {"encoder", "scart", "aux"};
 
        int fd;
        
 
        int fd;
        
@@ -122,7 +122,7 @@ void eAVSwitch::setInput(int val)
 void eAVSwitch::setFastBlank(int val)
 {
        int fd;
 void eAVSwitch::setFastBlank(int val)
 {
        int fd;
-       char *fb[] = {"low", "high", "vcr"};
+       const char *fb[] = {"low", "high", "vcr"};
 
        if((fd = open("/proc/stb/avs/0/fb", O_WRONLY)) < 0) {
                eDebug("cannot open /proc/stb/avs/0/fb");
 
        if((fd = open("/proc/stb/avs/0/fb", O_WRONLY)) < 0) {
                eDebug("cannot open /proc/stb/avs/0/fb");
@@ -140,10 +140,10 @@ void eAVSwitch::setColorFormat(int format)
        1-RGB
        2-S-Video
        */
        1-RGB
        2-S-Video
        */
-       char *cvbs="cvbs";
-       char *rgb="rgb";
-       char *svideo="svideo";
-       char *yuv="yuv";
+       const char *cvbs="cvbs";
+       const char *rgb="rgb";
+       const char *svideo="svideo";
+       const char *yuv="yuv";
        int fd;
        
        if((fd = open("/proc/stb/avs/0/colorformat", O_WRONLY)) < 0) {
        int fd;
        
        if((fd = open("/proc/stb/avs/0/colorformat", O_WRONLY)) < 0) {
@@ -178,8 +178,8 @@ void eAVSwitch::setAspectRatio(int ratio)
        5-16:10 PanScan
        6-16:9 forced ("letterbox")
        */
        5-16:10 PanScan
        6-16:9 forced ("letterbox")
        */
-       char *aspect[] = {"4:3", "4:3", "any", "16:9", "16:10", "16:10", "16:9", "16:9"};
-       char *policy[] = {"letterbox", "panscan", "bestfit", "panscan", "letterbox", "panscan", "letterbox"};
+       const char *aspect[] = {"4:3", "4:3", "any", "16:9", "16:10", "16:10", "16:9", "16:9"};
+       const char *policy[] = {"letterbox", "panscan", "bestfit", "panscan", "letterbox", "panscan", "letterbox"};
 
        int fd;
        if((fd = open("/proc/stb/video/aspect", O_WRONLY)) < 0) {
 
        int fd;
        if((fd = open("/proc/stb/video/aspect", O_WRONLY)) < 0) {
@@ -202,8 +202,8 @@ void eAVSwitch::setAspectRatio(int ratio)
 
 void eAVSwitch::setVideomode(int mode)
 {
 
 void eAVSwitch::setVideomode(int mode)
 {
-       char *pal="pal";
-       char *ntsc="ntsc";
+       const char *pal="pal";
+       const char *ntsc="ntsc";
        
        if (mode == m_video_mode)
                return;
        
        if (mode == m_video_mode)
                return;
@@ -256,7 +256,7 @@ void eAVSwitch::setWSS(int val) // 0 = auto, 1 = auto(4:3_off)
                eDebug("cannot open /proc/stb/denc/0/wss");
                return;
        }
                eDebug("cannot open /proc/stb/denc/0/wss");
                return;
        }
-       char *wss[] = {
+       const char *wss[] = {
                "off", "auto", "auto(4:3_off)", "4:3_full_format", "16:9_full_format",
                "14:9_letterbox_center", "14:9_letterbox_top", "16:9_letterbox_center",
                "16:9_letterbox_top", ">16:9_letterbox_center", "14:9_full_format"
                "off", "auto", "auto(4:3_off)", "4:3_full_format", "16:9_full_format",
                "14:9_letterbox_center", "14:9_letterbox_top", "16:9_letterbox_center",
                "16:9_letterbox_top", ">16:9_letterbox_center", "14:9_full_format"
@@ -273,7 +273,7 @@ void eAVSwitch::setSlowblank(int val)
                eDebug("cannot open /proc/stb/avs/0/sb");
                return;
        }
                eDebug("cannot open /proc/stb/avs/0/sb");
                return;
        }
-       char *sb[] = {"0", "6", "12", "vcr", "auto"};
+       const char *sb[] = {"0", "6", "12", "vcr", "auto"};
        write(fd, sb[val], strlen(sb[val]));
 //     eDebug("set slow blanking to %s", sb[val]);
        close(fd);
        write(fd, sb[val], strlen(sb[val]));
 //     eDebug("set slow blanking to %s", sb[val]);
        close(fd);
index e70ed0a..cab0220 100644 (file)
@@ -1600,7 +1600,7 @@ RESULT eEPGCache::getNextTimeEntry(ePtr<eServiceEvent> &result)
        return -1;
 }
 
        return -1;
 }
 
-void fillTuple(ePyObject tuple, char *argstring, int argcount, ePyObject service, eServiceEvent *ptr, ePyObject nowTime, ePyObject service_name )
+void fillTuple(ePyObject tuple, const char *argstring, int argcount, ePyObject service, eServiceEvent *ptr, ePyObject nowTime, ePyObject service_name )
 {
        ePyObject tmp;
        int spos=0, tpos=0;
 {
        ePyObject tmp;
        int spos=0, tpos=0;
@@ -1661,7 +1661,7 @@ void fillTuple(ePyObject tuple, char *argstring, int argcount, ePyObject service
        }
 }
 
        }
 }
 
-int handleEvent(eServiceEvent *ptr, ePyObject dest_list, char* argstring, int argcount, ePyObject service, ePyObject nowTime, ePyObject service_name, ePyObject convertFunc, ePyObject convertFuncArgs)
+int handleEvent(eServiceEvent *ptr, ePyObject dest_list, const char* argstring, int argcount, ePyObject service, ePyObject nowTime, ePyObject service_name, ePyObject convertFunc, ePyObject convertFuncArgs)
 {
        if (convertFunc)
        {
 {
        if (convertFunc)
        {
@@ -1725,7 +1725,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
 {
        ePyObject convertFuncArgs;
        int argcount=0;
 {
        ePyObject convertFuncArgs;
        int argcount=0;
-       char *argstring=NULL;
+       const char *argstring=NULL;
        if (!PyList_Check(list))
        {
                PyErr_SetString(PyExc_StandardError,
        if (!PyList_Check(list))
        {
                PyErr_SetString(PyExc_StandardError,
index f7f1680..328d95e 100644 (file)
@@ -40,7 +40,7 @@ void eVideoWidget::updatePosition(int disable)
 
        for (int i=0; i<4; ++i)
        {
 
        for (int i=0; i<4; ++i)
        {
-               char *targets[]={"left", "top", "width", "height"};
+               const char *targets[]={"left", "top", "width", "height"};
                char filename[128];
                snprintf(filename, 128, "/proc/stb/vmpeg/%d/dst_%s", m_decoder, targets[i]);
                FILE *f = fopen(filename, "w");
                char filename[128];
                snprintf(filename, 128, "/proc/stb/vmpeg/%d/dst_%s", m_decoder, targets[i]);
                FILE *f = fopen(filename, "w");