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 733362 - validate: duplicate strings in gst_validate_issue_new()
validate: duplicate strings in gst_validate_issue_new()
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-devtools
git master
Other Linux
: Normal normal
: 1.3.90
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-18 14:19 UTC by Aurélien Zanelli
Modified: 2014-09-26 08:14 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
validate: duplicate strings in gst_validate_issue_new() (2.40 KB, patch)
2014-07-18 14:21 UTC, Aurélien Zanelli
committed Details | Review

Description Aurélien Zanelli 2014-07-18 14:19:55 UTC
When compiling validate tools with -Wwrite-strings -Werror, I have:

gst-devtools/validate/gst/validate/gst-validate-report.c:65:1: note: expected 'gchar *' but argument is of type const char *'
gst-devtools/validate/gst/validate/gst-validate-report.c:182:3: error: passing argument 2 of 'gst_validate_issue_new' discards 'const' qualifier from pointer target type [-Werror]

due to the fact that gst_validate_issue_new() discard 'const' qualifier and we use it with constant strings. Also it will cause some issue with the free method.
Comment 1 Aurélien Zanelli 2014-07-18 14:21:51 UTC
Created attachment 281102 [details] [review]
validate: duplicate strings in gst_validate_issue_new()

Duplicate strings in new method()
No change in free method since it already free these strings.
Comment 2 Thibault Saunier 2014-07-18 14:30:24 UTC
Thanks for the patch. The issue about freeing const string was never noticed because we do not have a deinit function yes.

Attachment 281102 [details] pushed as d1c261f - validate: duplicate strings in gst_validate_issue_new()