softplay cvs warning cleanups
Commit Message
I noticed a few warnings when building softplay from cvs.
make[1]: Entering directory
`/var/local/vdr/vdr-1.3.45-eepg/PLUGINS/src/softplay.cvs'
ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
-DPLUGIN_NAME_I18N='"softplay"' -I../../../include -I/usr/src/DVB/linux/include
-I/usr/include/ffmpeg/ -I/usr/include/ffmpeg//libavformat
-I/usr/include/ffmpeg//libavcodec -I/usr/include/ffmpeg//libavutil PlayListMenu.c
PlayListMenu.c: In member function `virtual eOSState
cReplayList::ProcessKey(eKeys)':
PlayListMenu.c:242: warning: int format, time_t arg (arg 3)
PlayListMenu.c:242: warning: int format, time_t arg (arg 4)
ccache g++ -g -O2 -Wall -Woverloaded-virtual -c -D_GNU_SOURCE
-DPLUGIN_NAME_I18N='"softplay"' -I../../../include -I/usr/src/DVB/linux/include
-I/usr/include/ffmpeg/ -I/usr/include/ffmpeg//libavformat
-I/usr/include/ffmpeg//libavcodec -I/usr/include/ffmpeg//libavutil FileIndex.c
FileIndex.c: In member function `void cIndex::ParseM3uExtInf(const char*)':
FileIndex.c:98: warning: char format, different type arg (arg 3)
ccache g++ -g -O2 -Wall -Woverloaded-virtual -shared softplay.o SoftPlayer.o
PlayList.o PlayListMenu.o i18n.o FileIndex.o Receiver.o Setup.o -lavformat
-lavcodec -lz -o libvdr-softplay.so
The attached patch seems to fix the problem.
BR.
Comments
C.Y.M schrieb:
> --- softplay/FileIndex.c.orig 2006-03-12 12:23:23.000000000 -0800
> +++ softplay/FileIndex.c 2006-04-01 21:44:37.000000000 -0800
> @@ -95,7 +95,7 @@
>
> skipSpaces(pos);
> printf("duration '%s' \n",pos);
> - if ( !*pos || sscanf(pos,"%100[0-9]%n",&tmp,&len) == 0 ) {
> + if ( !*pos || sscanf(pos,"%100[0-9]%n",(char *)&tmp,&len) == 0 ) {
> printf("EXTINF Could not parse duration \"%s\". Ignoring.\n",pos);
> return;
> };
Hmm, that one is actually a bug, that should read:
if ( !*pos || sscanf(pos,"%100[0-9]%n",tmp,&len) == 0 ) {
I guess there is some sense in compiler warnings ;-)
Thank you for the patch, I applied a slightly modified version fixing
the bug above.
Bye,
Martin
@@ -95,7 +95,7 @@
skipSpaces(pos);
printf("duration '%s' \n",pos);
- if ( !*pos || sscanf(pos,"%100[0-9]%n",&tmp,&len) == 0 ) {
+ if ( !*pos || sscanf(pos,"%100[0-9]%n",(char *)&tmp,&len) == 0 ) {
printf("EXTINF Could not parse duration \"%s\". Ignoring.\n",pos);
return;
};
@@ -240,7 +240,7 @@
time(NULL) - lastActivity > 40
&& !hold ) {
MENUDEB("SetCurrent current title %d time %d lastActivity %d\n",
- playList->GetCurrIdx(),time(NULL),lastActivity);
+ playList->GetCurrIdx(),int(time(NULL)),int(lastActivity));
SetCurrent(Get(playList->GetCurrIdx()));
Display();
};
@@ -511,8 +511,8 @@
void cSoftPlay::ScanForPlaylists() {
struct dirent **namelist;
int n;
- char Name[60];
- char Title[60];
+ //char Name[60];
+ //char Title[60];
n = scandir(configDir, &namelist, 0, alphasort);