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 782031 - gst-validate-images-check.c doesn't build with msvc
gst-validate-images-check.c doesn't build with msvc
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
unspecified
Other All
: Normal normal
: 1.13.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-05-01 20:56 UTC by Scott D Phillips
Modified: 2017-05-04 22:17 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
[PATCH gst-devtools] validate: cast away constness in GOptionEntry (1.62 KB, patch)
2017-05-01 20:56 UTC, Scott D Phillips
needs-work Details | Review
[PATCH gst-devtools v2] validate: cast away constness in GOptionEntry (1.20 KB, patch)
2017-05-01 21:43 UTC, Scott D Phillips
none Details | Review
[PATCH gst-devtools v3] validate: remove const from outfolder (1.23 KB, patch)
2017-05-02 17:24 UTC, Scott D Phillips
committed Details | Review

Description Scott D Phillips 2017-05-01 20:56:25 UTC
Created attachment 350826 [details] [review]
[PATCH gst-devtools] validate: cast away constness in GOptionEntry

msvc warns about a constness issue which breaks building.
Comment 1 Reynaldo H. Verdejo Pinochet 2017-05-01 21:05:03 UTC
Review of attachment 350826 [details] [review]:

::: hooks/pre-commit.hook
@@ +64,3 @@
     $INDENT ${INDENT_PARAMETERS} \
         $newfile 2>> /dev/null
+    dos2unix $newfile

^ included by mistake I guess?
Comment 2 Scott D Phillips 2017-05-01 21:43:54 UTC
Created attachment 350829 [details] [review]
[PATCH gst-devtools v2] validate: cast away constness in GOptionEntry

Oops, right that was a mistake.
Comment 3 Thibault Saunier 2017-05-01 22:57:22 UTC
ooc, on what msvc version is it failling? (it is working with msvc 19.00.24215.1 afaict)[0]

[0] https://ci.appveyor.com/project/thiblahute/gst-build-ge9m5
Comment 4 Scott D Phillips 2017-05-01 23:04:14 UTC
(In reply to Thibault Saunier from comment #3)
> ooc, on what msvc version is it failling? (it is working with msvc
> 19.00.24215.1 afaict)[0]
> 
> [0] https://ci.appveyor.com/project/thiblahute/gst-build-ge9m5

This is with 19.10.25019 from the "Build Tools for Visual Studio 2017"
Comment 5 Tim-Philipp Müller 2017-05-02 08:43:04 UTC
Comment on attachment 350829 [details] [review]
[PATCH gst-devtools v2] validate: cast away constness in GOptionEntry

>     {"result-output-folder", 'r', 0, G_OPTION_ARG_FILENAME,
>-          &outfolder,
>+          (gpointer) & outfolder,

I think what's wrong and needs fixing is the

  const gchar *outfolder;
Comment 6 Scott D Phillips 2017-05-02 17:24:23 UTC
Created attachment 350901 [details] [review]
[PATCH gst-devtools v3] validate: remove const from outfolder

changes since v2
- remove const from outfolder instead of casting in GOptionEntry
Comment 7 Reynaldo H. Verdejo Pinochet 2017-05-04 22:11:12 UTC
Review of attachment 350901 [details] [review]:

Thanks Scott. Pushed as:

commit e1bf823e0c9c2d3d32cb750525bc54598dea7ded
Author: Scott D Phillips <scott.d.phillips@intel.com>
Date:   Mon May 1 13:51:48 2017 -0700

    validate: remove const from outfolder
    
    GOptionEntry's arg_data is of type gpointer which differs in
    constness from const gchar*, so remove constness from outfolder.
    This fixes a build issue with msvc.