summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitar Petrovski <dimeptr@gmail.com>2011-04-29 22:19:51 +0200
committerDimitar Petrovski <dimeptr@gmail.com>2011-04-29 22:19:51 +0200
commit7c6b0d167cdccd79c51d69ce6c938f1128fe7cda (patch)
treee0a7e3d4fd7f12f42acb91e72700af530f3008cf
parent079b90c7d5eb112a3876d005303a0e4caffe5921 (diff)
downloadvdr-plugin-eepg-7c6b0d167cdccd79c51d69ce6c938f1128fe7cda.tar.gz
vdr-plugin-eepg-7c6b0d167cdccd79c51d69ce6c938f1128fe7cda.tar.bz2
remove some warnings
-rw-r--r--Makefile2
-rw-r--r--eepg.c22
2 files changed, 20 insertions, 4 deletions
diff --git a/Makefile b/Makefile
index 3319320..d5a15f4 100644
--- a/Makefile
+++ b/Makefile
@@ -31,7 +31,7 @@ VERSION = $(shell grep 'static const char \*VERSION *=' $(PLUGIN).c | awk '{ pri
### The C++ compiler and options:
CXX ?= g++
-CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual
+CXXFLAGS ?= -O2 -fPIC -Wall -Woverloaded-virtual -Wno-unused-result
### The directory environment:
diff --git a/eepg.c b/eepg.c
index e610bd5..b8e1ca7 100644
--- a/eepg.c
+++ b/eepg.c
@@ -635,20 +635,36 @@ void CleanString (unsigned char *String)
}
}
+// int aSprintF (char **strp, const char *fmt, const char *str1, const char *str2) {
+ // int ret = asprintf (&FileName, "%s/%s", ConfDir, "sky_uk.themes");
+ // if (ret < 0) {
+ // esyslog ("EEPG: Error, not enough memory to create string %s ...", str1);
+ // }
+ // return ret;
+// }
+
bool cFilterEEPG::GetThemesSKYBOX (void) //TODO can't we read this from the DVB stream?
{
char *FileName;
FILE *FileThemes;
char *Line;
char Buffer[256];
+ const char *themeFilename;
+
if (Format == SKY_IT)
- asprintf (&FileName, "%s/%s", ConfDir, "sky_it.themes");
+ themeFilename = "sky_it.themes";
else if (Format == SKY_UK)
- asprintf (&FileName, "%s/%s", ConfDir, "sky_uk.themes");
+ themeFilename = "sky_uk.themes";
else {
esyslog ("EEPG: Error, wrong format detected in GetThemesSKYBOX. Format = %i.", Format);
return false;
}
+
+ if (asprintf (&FileName, "%s/%s", ConfDir, themeFilename) < 0) {
+ esyslog ("EEPG: Error, not enough memory to create filename");
+ return false;
+ }
+
//asprintf( &FileName, "%s/%s", ConfDir, ( lProviders + CurrentProvider )->Parm3 );
FileThemes = fopen (FileName, "r");
if (FileThemes == NULL) {
@@ -962,7 +978,7 @@ void cFilterEEPG::LoadEquivalentChannels (void)
tChannelID OriginalChID = tChannelID (cSource::FromString (string3), int1, int2, int3, int4);
bool found = false;
int i = 0;
- sChannel *C;
+ sChannel *C = NULL;
while (i < nChannels && (!found)) {
C = &sChannels[i];
if (C->Src[0] == cSource::FromString (string3) && C->Nid[0] == int1