Fixed build warnings 57/151557/1 accepted/tizen/unified/20170925.071331 submit/tizen/20170922.075605
authorGilbok Lee <gilbok.lee@samsung.com>
Thu, 21 Sep 2017 07:33:22 +0000 (16:33 +0900)
committerGilbok Lee <gilbok.lee@samsung.com>
Thu, 21 Sep 2017 07:33:22 +0000 (16:33 +0900)
Change-Id: I78a4f8e79d8bac2e037e4427ce5ccba708eed2ef

configure.ac
gst/typefind/gsttypefindfunctions.c

index 02c13ae..56d8a84 100644 (file)
@@ -429,14 +429,14 @@ dnl -Wformat-nonliteral - see ext/pango/gstclockoverlay.c and http://gcc.gnu.org
 AG_GST_SET_ERROR_CFLAGS($FATAL_WARNINGS, [
     -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wundef
     -Wwrite-strings -Wformat-nonliteral -Wformat-security
-    -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return
+    -Winit-self -Wmissing-include-dirs -Waddress
     -Wno-multichar -Wnested-externs $NO_WARNINGS])
 
 dnl define an ERROR_CXXFLAGS Makefile variable
 AG_GST_SET_ERROR_CXXFLAGS($FATAL_WARNINGS, [
     -Wmissing-declarations -Wredundant-decls -Wundef
     -Wwrite-strings -Wformat-nonliteral -Wformat-security
-    -Winit-self -Wmissing-include-dirs -Waddress -Waggregate-return
+    -Winit-self -Wmissing-include-dirs -Waddress
     -Wno-multichar $NO_WARNINGS])
 
 dnl define correct level for debugging messages
index 88c513c..49bfe77 100644 (file)
@@ -359,7 +359,7 @@ utf32_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** text/uri-list ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
 
 #define URI_CAPS (gst_static_caps_get(&uri_caps))
@@ -375,6 +375,7 @@ static GstStaticCaps uri_caps = GST_STATIC_CAPS ("text/uri-list");
     data++;                                                             \
   }                                                                     \
 }
+
 static void
 uri_type_find (GstTypeFind * tf, gpointer unused)
 {
@@ -421,7 +422,7 @@ uri_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, URI_CAPS);
   }
 }
-
+#endif
 /*** application/x-hls ***/
 
 static GstStaticCaps hls_caps = GST_STATIC_CAPS ("application/x-hls");
@@ -582,6 +583,7 @@ xml_check_first_element (GstTypeFind * tf, const gchar * element, guint elen,
 
   return FALSE;
 }
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 
 static GstStaticCaps generic_xml_caps = GST_STATIC_CAPS ("application/xml");
 
@@ -593,7 +595,7 @@ xml_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MINIMUM, GENERIC_XML_CAPS);
   }
 }
-
+#endif
 /*** application/dash+xml ****************************************************/
 
 static GstStaticCaps dash_caps = GST_STATIC_CAPS ("application/dash+xml");
@@ -643,7 +645,7 @@ sdp_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** application/smil *********************************************************/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps smil_caps = GST_STATIC_CAPS ("application/smil");
 
 #define SMIL_CAPS (gst_static_caps_get(&smil_caps))
@@ -694,7 +696,7 @@ html_type_find (GstTypeFind * tf, gpointer unused)
     }
   }
 }
-
+#endif
 /*** audio/midi ***/
 
 static GstStaticCaps mid_caps = GST_STATIC_CAPS ("audio/midi");
@@ -740,7 +742,7 @@ mxmf_type_find (GstTypeFind * tf, gpointer unused)
 
 
 /*** video/x-fli ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps flx_caps = GST_STATIC_CAPS ("video/x-fli");
 
 #define FLX_CAPS gst_static_caps_get(&flx_caps)
@@ -769,7 +771,7 @@ flx_type_find (GstTypeFind * tf, gpointer unused)
     return;
   }
 }
-
+#endif
 /*** application/x-id3 ***/
 
 static GstStaticCaps id3_caps = GST_STATIC_CAPS ("application/x-id3");
@@ -824,7 +826,7 @@ apetag_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** audio/x-ttafile ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps tta_caps = GST_STATIC_CAPS ("audio/x-ttafile");
 
 #define TTA_CAPS gst_static_caps_get(&tta_caps)
@@ -840,7 +842,7 @@ tta_type_find (GstTypeFind * tf, gpointer unused)
     }
   }
 }
-
+#endif
 /*** audio/x-flac ***/
 static GstStaticCaps flac_caps = GST_STATIC_CAPS ("audio/x-flac");
 
@@ -1852,7 +1854,7 @@ dts_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** gsm ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /* can only be detected by using the extension, in which case we use the default
  * GSM properties */
 static GstStaticCaps gsm_caps =
@@ -2051,10 +2053,11 @@ static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
     "systemstream = (boolean) true, mpegversion = (int) [ 1, 2 ]");
 
 #define MPEG_SYS_CAPS gst_static_caps_get(&mpeg_sys_caps)
+#endif
 #define IS_MPEG_HEADER(data) (G_UNLIKELY((((guint8 *)(data))[0] == 0x00) &&  \
                                          (((guint8 *)(data))[1] == 0x00) &&  \
                                          (((guint8 *)(data))[2] == 0x01)))
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 #define IS_MPEG_PACK_CODE(b) ((b) == 0xBA)
 #define IS_MPEG_SYS_CODE(b) ((b) == 0xBB)
 #define IS_MPEG_PACK_HEADER(data)       (IS_MPEG_HEADER (data) &&            \
@@ -2064,6 +2067,7 @@ static GstStaticCaps mpeg_sys_caps = GST_STATIC_CAPS ("video/mpeg, "
                              (b) >= 0xBD)
 #define IS_MPEG_PES_HEADER(data)        (IS_MPEG_HEADER (data) &&            \
                                          IS_MPEG_PES_CODE (((guint8 *)(data))[3]))
+#endif
 
 #define MPEG2_MAX_PROBE_LENGTH (128 * 1024)     /* 128kB should be 64 packs of the
                                                  * most common 2kB pack size. */
@@ -2123,6 +2127,7 @@ mpeg_sys_is_valid_pack (GstTypeFind * tf, const guint8 * data, guint len,
   return FALSE;
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static gboolean
 mpeg_sys_is_valid_pes (GstTypeFind * tf, const guint8 * data, guint len,
     guint * pack_size)
@@ -2321,7 +2326,7 @@ suggest:
         "mpegversion", G_TYPE_INT, mpegversion, NULL);
   }
 };
-
+#endif
 /*** video/mpegts Transport Stream ***/
 static GstStaticCaps mpegts_caps = GST_STATIC_CAPS ("video/mpegts, "
     "systemstream = (boolean) true, packetsize = (int) [ 188, 208 ]");
@@ -2939,7 +2944,7 @@ aiff_type_find (GstTypeFind * tf, gpointer unused)
 }
 
 /*** audio/x-svx ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps svx_caps = GST_STATIC_CAPS ("audio/x-svx");
 
 #define SVX_CAPS gst_static_caps_get(&svx_caps)
@@ -2988,7 +2993,7 @@ ape_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_LIKELY + 10, APE_CAPS);
   }
 }
-
+#endif
 /*** ISO FORMATS ***/
 
 /*** audio/x-m4a ***/
@@ -3074,6 +3079,7 @@ q3gp_type_find (GstTypeFind * tf, gpointer unused)
 
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** video/mj2 and image/jp2 ***/
 static GstStaticCaps mj2_caps = GST_STATIC_CAPS ("video/mj2");
 
@@ -3105,7 +3111,7 @@ jp2_type_find (GstTypeFind * tf, gpointer unused)
       gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, MJ2_CAPS);
   }
 }
-
+#endif
 /*** video/quicktime ***/
 
 static GstStaticCaps qt_caps = GST_STATIC_CAPS ("video/quicktime");
@@ -3236,7 +3242,7 @@ done:
 
 
 /*** image/x-quicktime ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps qtif_caps = GST_STATIC_CAPS ("image/x-quicktime");
 
 #define QTIF_CAPS gst_static_caps_get(&qtif_caps)
@@ -3594,7 +3600,7 @@ swf_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, SWF_CAPS);
   }
 }
-
+#endif
 /*** application/vnd.ms-sstr+xml ***/
 
 static void
@@ -3861,6 +3867,7 @@ bmp_type_find (GstTypeFind * tf, gpointer unused)
       NULL);
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** image/tiff ***/
 static GstStaticCaps tiff_caps = GST_STATIC_CAPS ("image/tiff, "
     "endianness = (int) { BIG_ENDIAN, LITTLE_ENDIAN }");
@@ -3886,7 +3893,7 @@ tiff_type_find (GstTypeFind * tf, gpointer ununsed)
     }
   }
 }
-
+#endif
 /*** image/x-exr ***/
 static GstStaticCaps exr_caps = GST_STATIC_CAPS ("image/x-exr");
 #define EXR_CAPS (gst_static_caps_get(&exr_caps))
@@ -4012,6 +4019,7 @@ pnm_type_find (GstTypeFind * tf, gpointer ununsed)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps sds_caps = GST_STATIC_CAPS ("audio/x-sds");
 
 #define SDS_CAPS (gst_static_caps_get(&sds_caps))
@@ -4065,7 +4073,7 @@ ircam_type_find (GstTypeFind * tf, gpointer ununsed)
     }
   }
 }
-
+#endif
 /*** Matroska/WebM ***/
 
 #define EBML_HEADER           0x1A45DFA3
@@ -4319,6 +4327,7 @@ matroska_type_find (GstTypeFind * tf, gpointer ununsed)
 }
 
 /*** application/mxf ***/
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static GstStaticCaps mxf_caps = GST_STATIC_CAPS ("application/mxf");
 
 #define MXF_MAX_PROBE_LENGTH (1024 * 64)
@@ -4398,7 +4407,7 @@ dv_type_find (GstTypeFind * tf, gpointer private)
         "format", G_TYPE_STRING, format, NULL);
   }
 }
-
+#endif
 
 /*** Ogg variants ***/
 static GstStaticCaps ogg_caps =
@@ -4577,6 +4586,7 @@ theora_type_find (GstTypeFind * tf, gpointer private)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** kate ***/
 static void
 kate_type_find (GstTypeFind * tf, gpointer private)
@@ -4805,7 +4815,7 @@ ar_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_NEARLY_CERTAIN, AR_CAPS);
   }
 }
-
+#endif
 /*** audio/x-au ***/
 
 /* NOTE: we cannot replace this function with TYPE_FIND_REGISTER_START_WITH,
@@ -4850,6 +4860,7 @@ nuv_type_find (GstTypeFind * tf, gpointer unused)
   }
 }
 
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 /*** audio/x-paris ***/
 /* NOTE: do not replace this function with two TYPE_FIND_REGISTER_START_WITH */
 static GstStaticCaps paris_caps = GST_STATIC_CAPS ("audio/x-paris");
@@ -5051,7 +5062,7 @@ vivo_type_find (GstTypeFind * tf, gpointer unused)
     gst_type_find_suggest (tf, GST_TYPE_FIND_MAXIMUM, VIVO_CAPS);
   }
 }
-
+#endif
 /*** XDG MIME typefinder (to avoid false positives mostly) ***/
 
 #ifdef USE_GIO
@@ -5109,7 +5120,7 @@ xdgmime_typefind (GstTypeFind * find, gpointer user_data)
 #endif /* USE_GIO */
 
 /*** Windows icon typefinder (to avoid false positives mostly) ***/
-
+#ifndef TIZEN_FEATURE_DISABLE_MIME_TYPES
 static void
 windows_icon_typefind (GstTypeFind * find, gpointer user_data)
 {
@@ -5151,7 +5162,6 @@ windows_icon_typefind (GstTypeFind * find, gpointer user_data)
 }
 
 /*** WAP WBMP typefinder ***/
-
 static void
 wbmp_typefind (GstTypeFind * find, gpointer user_data)
 {
@@ -5207,6 +5217,7 @@ wbmp_typefind (GstTypeFind * find, gpointer user_data)
 }
 
 /*** DEGAS Atari images (also to avoid false positives, see #625129) ***/
+
 static void
 degas_type_find (GstTypeFind * tf, gpointer private)
 {
@@ -5260,7 +5271,6 @@ degas_type_find (GstTypeFind * tf, gpointer private)
 }
 
 /*** y4m ***/
-
 static void
 y4m_typefind (GstTypeFind * tf, gpointer private)
 {
@@ -5272,7 +5282,7 @@ y4m_typefind (GstTypeFind * tf, gpointer private)
         "application/x-yuv4mpeg", "y4mversion", G_TYPE_INT, 2, NULL);
   }
 }
-
+#endif
 /*** DVD ISO images (looks like H.264, see #674069) ***/
 static void
 dvdiso_type_find (GstTypeFind * tf, gpointer private)