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 6ffd04c74e098ab96cffeaea1fe7a75132414c57..4b40bea026b4614744e0ae213605efd436d246a5 100644 (file)
@@ -27,9 +27,9 @@ class eAutoInit
        virtual void closeNow()=0;
 protected:
        int rl;
-       char *description;
+       const char *description;
 public:
-       eAutoInit(int rl, char *description): rl(rl), description(description)
+       eAutoInit(int rl, const char *description): rl(rl), description(description)
        {
        }
        virtual ~eAutoInit();
@@ -54,7 +54,7 @@ public:
        {
                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);
        }
@@ -85,7 +85,7 @@ public:
        {
                return t;
        }
-       eAutoInitP0(int runl, char *description): eAutoInit(runl, description)
+       eAutoInitP0(int runl, const char *description): eAutoInit(runl, description)
        {
                eInit::add(rl, this);
        }
@@ -116,7 +116,7 @@ public:
        {
                return t;
        }
-       eAutoInitPtr(int runl, char *description): eAutoInit(runl, description)
+       eAutoInitPtr(int runl, const char *description): eAutoInit(runl, description)
        {
                eInit::add(rl, this);
        }
index a936aa543dd6cb8678b59e19a310b8d893e5a159..0fc53da55efdf189d02c22e1c3f46eb9453f3b3a 100644 (file)
@@ -103,7 +103,7 @@ void eAVSwitch::setInput(int val)
        2-aux
        */
 
-       char *input[] = {"encoder", "scart", "aux"};
+       const char *input[] = {"encoder", "scart", "aux"};
 
        int fd;
        
@@ -122,7 +122,7 @@ void eAVSwitch::setInput(int val)
 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");
@@ -140,10 +140,10 @@ void eAVSwitch::setColorFormat(int format)
        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) {
@@ -178,8 +178,8 @@ void eAVSwitch::setAspectRatio(int ratio)
        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) {
@@ -202,8 +202,8 @@ void eAVSwitch::setAspectRatio(int ratio)
 
 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;
@@ -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;
        }
-       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"
@@ -273,7 +273,7 @@ void eAVSwitch::setSlowblank(int val)
                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);
index e70ed0abefc6b85c0907f14dfd11fa9c33ed29bf..cab02201c3236b3820ccc12d5cb0586023463e26 100644 (file)
@@ -1600,7 +1600,7 @@ RESULT eEPGCache::getNextTimeEntry(ePtr<eServiceEvent> &result)
        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;
@@ -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)
        {
@@ -1725,7 +1725,7 @@ PyObject *eEPGCache::lookupEvent(ePyObject list, ePyObject convertFunc)
 {
        ePyObject convertFuncArgs;
        int argcount=0;
-       char *argstring=NULL;
+       const char *argstring=NULL;
        if (!PyList_Check(list))
        {
                PyErr_SetString(PyExc_StandardError,
index f7f1680370f8b940b7161e687dbea7b3d8f674dd..328d95e484c8e56f628b3e5ebd76806b0a5c2764 100644 (file)
@@ -40,7 +40,7 @@ void eVideoWidget::updatePosition(int disable)
 
        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");