File libmediascan-0.1-fix-some-warnings.patch of Package libmediascan
Fix some compiler warnings
This fixes _some_ of the compiler warnings in libmediascan, the one
in mediascan_linux.c is potentially a real issue.
diff -up libmediascan-0.1/src/image_gif.c~ libmediascan-0.1/src/image_gif.c
--- libmediascan-0.1/src/image_gif.c~ 2011-11-21 00:37:19.000000000 +0100
+++ libmediascan-0.1/src/image_gif.c 2014-08-08 18:01:31.133552634 +0200
@@ -76,7 +76,6 @@ int image_gif_load(MediaScanImage *i) {
GifByteType *ExtData;
SavedImage *sp;
SavedImage temp_save;
- int BackGround = 0;
int trans_index = 0; // transparent index if any
ColorMapObject *ColorMap;
GifColorType *ColorMapEntry;
@@ -109,7 +108,6 @@ int image_gif_load(MediaScanImage *i) {
i->width = sp->ImageDesc.Width;
i->height = sp->ImageDesc.Height;
- BackGround = g->gif->SBackGroundColor; // XXX needed?
ColorMap = g->gif->Image.ColorMap ? g->gif->Image.ColorMap : g->gif->SColorMap;
if (ColorMap == NULL) {
diff -up libmediascan-0.1/src/mediascan_linux.c~ libmediascan-0.1/src/mediascan_linux.c
--- libmediascan-0.1/src/mediascan_linux.c~ 2014-08-08 17:58:50.000000000 +0200
+++ libmediascan-0.1/src/mediascan_linux.c 2014-08-08 17:59:50.783482039 +0200
@@ -67,4 +67,5 @@ int PathIsDirectory(const char *dir) {
if (S_ISDIR(st_buf.st_mode)) {
return 1; //return true if path is a directory
}
+ return 0;
} /* PathIsDirectory() */
diff -up libmediascan-0.1/src/result.c~ libmediascan-0.1/src/result.c
--- libmediascan-0.1/src/result.c~ 2011-11-21 00:37:19.000000000 +0100
+++ libmediascan-0.1/src/result.c 2014-08-08 18:01:10.764538238 +0200
@@ -46,39 +46,6 @@
const char CODEC_MP1[] = "mp1";
-// *INDENT-OFF*
-static type_ext audio_types[] = {
-/*
- {"mp4", {"mp4", "m4a", "m4b", "m4p", "m4v", "m4r", "k3g", "skm", "3gp", "3g2", "mov", 0}},
- {"aac", {"aac", 0}},
- {"mp3", {"mp3", "mp2", 0}},
- {"ogg", {"ogg", "oga", 0}},
- {"mpc", {"mpc", "mp+", "mpp", 0}},
- {"ape", {"ape", "apl", 0}},
- {"flc", {"flc", "flac", "fla", 0}},
- {"asf", {"wma", "asf", "wmv", 0}},
-*/
- {"wav", {"wav", "aif", "aiff", 0}},
-// {"wvp", {"wv", 0}},
- {0, {0, 0}}
-};
-
-static type_handler audio_handlers[] = {
-/*
- { "mp4", get_mp4tags, 0, mp4_find_frame, mp4_find_frame_return_info },
- { "aac", get_aacinfo, 0, 0, 0 },
- { "mp3", get_mp3tags, get_mp3fileinfo, mp3_find_frame, 0 },
- { "ogg", get_ogg_metadata, 0, ogg_find_frame, 0 },
- { "mpc", get_ape_metadata, get_mpcfileinfo, 0, 0 },
- { "ape", get_ape_metadata, get_macfileinfo, 0, 0 },
- { "flc", get_flac_metadata, 0, flac_find_frame, 0 },
- { "asf", get_asf_metadata, 0, asf_find_frame, 0 },
- { "wav", wav_scan },
- { "wvp", get_ape_metadata, get_wavpack_info, 0 },
-*/
- {NULL, 0}
-};
-
// MIME type extension mappings
static const struct {
const char *extensions;