mirror of
https://github.com/tuxbox-fork-migrations/recycled-ni-neutrino.git
synced 2025-08-28 16:01:10 +02:00
fix up libxmltree interfaces, so that useless casts can be removed
Lots of places hat casts from (const char*) to (char *) to silence
a "deprecated conversion" warning. Instead of casting (which is
inherently wrong), fix up the libxmltree interfaces.
git-svn-id: file:///home/bas/coolstream_public_svn/THIRDPARTY/applications/neutrino-experimental@117 e54a6e83-5905-42d5-8d5c-058d10e6a962
Origin commit data
------------------
Commit: 8070a9613d
Author: Stefan Seyfried <seife@tuxbox-git.slipkontur.de>
Date: 2009-12-22 (Tue, 22 Dec 2009)
This commit is contained in:
@@ -575,14 +575,14 @@ bool CFileBrowser::readDir_vlc(const std::string & dirname, CFileList* flist)
|
||||
} else {
|
||||
while (element) {
|
||||
CFile file;
|
||||
ptr = xmlGetAttribute(element, (char *) "type");
|
||||
ptr = xmlGetAttribute(element, "type");
|
||||
if (strcmp(ptr, "directory")==0)
|
||||
file.Mode = S_IFDIR + 0777 ;
|
||||
else
|
||||
file.Mode = S_IFREG + 0777 ;
|
||||
|
||||
file.Name = dirname + xmlGetAttribute(element, (char *) "name");
|
||||
ptr = xmlGetAttribute(element, (char *) "size");
|
||||
file.Name = dirname + xmlGetAttribute(element, "name");
|
||||
ptr = xmlGetAttribute(element, "size");
|
||||
if (ptr)
|
||||
file.Size = atoi(ptr);
|
||||
else
|
||||
@@ -725,7 +725,7 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
CFile file;
|
||||
if (xml_decode == 1) {
|
||||
file.Mode = S_IFDIR + 0777 ;
|
||||
file.Name = xmlGetAttribute(element, (char *) "name");
|
||||
file.Name = xmlGetAttribute(element, "name");
|
||||
file.Url = "/sbin/newxml.phtml?genre=" + file.Name;
|
||||
file.Size = 0;
|
||||
file.Time = 0;
|
||||
@@ -735,17 +735,17 @@ printf("CFileBrowser::readDir_sc: read done, size %d\n", answer.size());
|
||||
ptr = xmlGetName(element);
|
||||
if (ptr != NULL) {
|
||||
if (strcmp(ptr, "tunein")==0) {
|
||||
ptr = xmlGetAttribute(element, (char *) "base");
|
||||
ptr = xmlGetAttribute(element, "base");
|
||||
if (ptr)
|
||||
tunein_base = ptr;
|
||||
} else if (strcmp(ptr, "station")==0) {
|
||||
ptr = xmlGetAttribute(element, (char *) "mt");
|
||||
ptr = xmlGetAttribute(element, "mt");
|
||||
if (ptr && (strcmp(ptr, "audio/mpeg")==0)) {
|
||||
file.Mode = S_IFREG + 0777 ;
|
||||
file.Name = xmlGetAttribute(element, (char *) "name");
|
||||
file.Url = base + tunein_base + (std::string)"?id=" + xmlGetAttribute(element, (char *) "id");
|
||||
file.Name = xmlGetAttribute(element, "name");
|
||||
file.Url = base + tunein_base + (std::string)"?id=" + xmlGetAttribute(element, "id");
|
||||
//printf("adding %s (%s)\n", file.Name.c_str(), file.Url.c_str());
|
||||
ptr = xmlGetAttribute(element, (char *) "br");
|
||||
ptr = xmlGetAttribute(element, "br");
|
||||
if (ptr) {
|
||||
file.Size = atoi(ptr);
|
||||
file.Time = atoi(ptr);
|
||||
|
Reference in New Issue
Block a user