After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 646744 - libgsttag: Minor issues building gst-plugins-base with MS compiler
libgsttag: Minor issues building gst-plugins-base with MS compiler
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
unspecified
Other Windows
: Normal normal
: 0.10.33
Assigned To: Tim-Philipp Müller
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2011-04-04 20:21 UTC by Haakon Sporsheim (ieei)
Modified: 2011-04-05 08:41 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Explicit cast to GThreadFunc to avoid warning (1.05 KB, patch)
2011-04-04 20:22 UTC, Haakon Sporsheim (ieei)
committed Details | Review
Constness removed to avoid cast warning. (1.28 KB, patch)
2011-04-04 20:24 UTC, Haakon Sporsheim (ieei)
committed Details | Review
Use gst/math-compat.h instead of just plain math.h (699 bytes, patch)
2011-04-04 20:24 UTC, Haakon Sporsheim (ieei)
committed Details | Review

Description Haakon Sporsheim (ieei) 2011-04-04 20:21:24 UTC
Minor fixes to the tag library making it build with the MS compiler.

See attached patches.
Comment 1 Haakon Sporsheim (ieei) 2011-04-04 20:22:30 UTC
Created attachment 185146 [details] [review]
Explicit cast to GThreadFunc to avoid warning
Comment 2 Haakon Sporsheim (ieei) 2011-04-04 20:24:16 UTC
Created attachment 185148 [details] [review]
Constness removed to avoid cast warning.

The const isn't needed if you ask me... some might disagree!?
Comment 3 Haakon Sporsheim (ieei) 2011-04-04 20:24:40 UTC
Created attachment 185149 [details] [review]
Use gst/math-compat.h instead of just plain math.h
Comment 4 Tim-Philipp Müller 2011-04-04 20:36:08 UTC
Does this in addition to your patches make it work as well:

diff --git a/gst-libs/gst/tag/xmpwriter.c b/gst-libs/gst/tag/xmpwriter.c
index b3a56b7..4f14a78 100644
--- a/gst-libs/gst/tag/xmpwriter.c
+++ b/gst-libs/gst/tag/xmpwriter.c
@@ -311,7 +311,8 @@ gst_tag_xmp_writer_tag_list_to_xmp_buffer (GstTagXmpWriter * config,
       for (iter = data->schemas; iter; iter = g_slist_next (iter)) {
         array[i++] = (gchar *) iter->data;
       }
-      buf = gst_tag_list_to_xmp_buffer_full (taglist, read_only, array);
+      buf = gst_tag_list_to_xmp_buffer_full (taglist, read_only,
+          (const gchar **) array);
       g_free (array);
     }
   }

gcc complains about it otherwise (guess the const-ness of string arrays is a bit muddled in the g-world..)
Comment 5 Tim-Philipp Müller 2011-04-04 22:43:01 UTC
I think it should work fine, so just pushed it:

commit 834a5a478c127c992e15a16f49883be94a9e3980
Author: Haakon Sporsheim <haakon.sporsheim@gmail.com>
Date:   Mon Apr 4 17:21:45 2011 +0200

    tag: use gst/math-compat.h header.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646744

commit f7036eb26027dd5d08a8f88f3165f74dab2ac73d
Author: Haakon Sporsheim <haakon.sporsheim@gmail.com>
Date:   Mon Apr 4 17:23:53 2011 +0200

    tag: Remove constness to silence MS compiler.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646744

commit 7b142178e4f26d23248928133e38e64649b9d317
Author: Haakon Sporsheim <haakon.sporsheim@gmail.com>
Date:   Mon Apr 4 17:23:13 2011 +0200

    tag: Explicit cast to GThreadFunc to silence MS compiler.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=646744


Thanks for the patches!
Comment 6 Haakon Sporsheim (ieei) 2011-04-05 08:41:41 UTC
Sure, even better. Thanks!