Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37765880
en ru br
ALT Linux repos
S:0.22-alt1.git20110709
5.0: 0.2.12-alt4.1
4.1: 0.2.10-alt1.2
4.0: 0.2.10-alt1.2

Group :: Sound
RPM: mpdscribble

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: mpdscribble-alt-warnings-fix.patch
Download


diff -ru mpdscribble-0.2.12.orig/as.c mpdscribble-0.2.12/as.c
--- mpdscribble-0.2.12.orig/as.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/as.c	2008-07-30 14:39:22 +0400
@@ -729,7 +729,9 @@
 unsigned int
 as_sleep (void)
 {
+  /*
   long end;
+  */
 
   if (!conn_pending ())
     return sleep (g_sleep);
diff -ru mpdscribble-0.2.12.orig/conn.c mpdscribble-0.2.12/conn.c
--- mpdscribble-0.2.12.orig/conn.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/conn.c	2008-07-30 15:36:06 +0400
@@ -92,6 +92,7 @@
 conn_mainloop_quit (void *data)
 {
   g_main_loop_quit (g.mainloop);
+  return 0;
 }
 
 int
diff -ru mpdscribble-0.2.12.orig/file.c mpdscribble-0.2.12/file.c
--- mpdscribble-0.2.12.orig/file.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/file.c	2008-07-30 15:44:49 +0400
@@ -321,7 +321,7 @@
 {
   char *mpd_host = getenv ("MPD_HOST");
   char *mpd_port = getenv ("MPD_PORT");
-  char *data;
+  char *data = NULL;
   int i;
 
   file_config.verbose = -1;
diff -ru mpdscribble-0.2.12.orig/lmc.c mpdscribble-0.2.12/lmc.c
--- mpdscribble-0.2.12.orig/lmc.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/lmc.c	2008-07-30 15:13:38 +0400
@@ -39,7 +39,7 @@
 {
   char *ch;
   for (ch = g_mpd->errorStr; *ch; ++ch) {
-    if (*ch=='\n' || *ch=='\t' || *ch=='\r' | *ch=='\v') {
+    if (*ch=='\n' || *ch=='\t' || *ch=='\r' || *ch=='\v') {
       *ch = ' ';
     }
   }
diff -ru mpdscribble-0.2.12.orig/mbid.c mpdscribble-0.2.12/mbid.c
--- mpdscribble-0.2.12.orig/mbid.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/mbid.c	2008-07-30 15:46:25 +0400
@@ -72,7 +72,7 @@
     return size;
 }
 
-int mfile(int length, char ret[], FILE *fp, int *s) {
+void mfile(int length, char ret[], FILE *fp, int *s) {
     int bytes = fread(ret,1,length,fp);
     
     if (bytes != length) {
@@ -151,6 +151,9 @@
     }
 
   int bytes = fread (data, 1, OGG_MAX_CHUNK_SIZE, fp);
+  if (bytes != OGG_MAX_CHUNK_SIZE)
+    goto ogg_failed;
+
   int marker_size = strlen (marker);
 
   int offset = -1;
@@ -203,7 +206,10 @@
   int bytes;
   unsigned char header[4];
   
-  fread (header, 1, 4, fp);
+  bytes = fread (header, 1, 4, fp);
+  if (bytes != 4)
+    return -1;
+
   size = header[3] | header[2]<<0x08 | header[1]<<0x10;
 
   if ((header[0] & 0x7F) == 0x04)
@@ -311,13 +317,12 @@
 
         mfile(2,version,fp,&s);
         int version_major = (int)version[0];
-        int version_minor = (int)version[1];
         if (version_major == 2) {
             debug("ID3v2.2.0 does not support MBIDs: %s\n",path);
             break;
         }
         if (version_major != 3 && version_major != 4) {
-            debug("Unsupported ID3 version: v2.%d.%d\n",version_major,version_minor);
+            debug("Unsupported ID3 version: v2.%d.%d\n",version_major,(int)version[1]);
             break;
         }
 
diff -ru mpdscribble-0.2.12.orig/mpdscribble.c mpdscribble-0.2.12/mpdscribble.c
--- mpdscribble-0.2.12.orig/mpdscribble.c	2008-07-28 20:57:36 +0400
+++ mpdscribble-0.2.12/mpdscribble.c	2008-07-30 15:59:40 +0400
@@ -23,6 +23,7 @@
 
 #include <stdlib.h>
 #include <stdio.h>
+#include <unistd.h>
 
 #include "file.h"
 #include "misc.h"
@@ -149,11 +150,10 @@
 
           submitted = 1;
 
-          if (file_config.musicdir)
+          if (file_config.musicdir && chdir (file_config.musicdir) != 0)
             {
               // yeah, I know i'm being silly, but I can't be arsed to 
               // concat the parts :P
-              chdir (file_config.musicdir);
               if (getMBID (song.file, mbid))
                 mbid[0] = 0x00;
               else
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin