Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix -Werror=cast-function-type with GCC 8 #217

Merged
merged 1 commit into from
Apr 9, 2019
Merged

Conversation

rbuj
Copy link
Contributor

@rbuj rbuj commented Mar 3, 2019

export CFLAGS="-Werror=cast-function-type -Wno-deprecated-declarations"
./autogen.sh --prefix=/usr
make
sudo make install

@sc0w
Copy link
Member

sc0w commented Mar 3, 2019

travis fails in fedora:

Traceback (most recent call last):
  File "/usr/bin/itstool", line 1611, in <module>
    doc.merge_translations(translations, opts.lang, strict=opts.strict)
  File "/usr/bin/itstool", line 999, in merge_translations
    lcnode.setProp(attr, origlang)
  File "/usr/lib64/python3.7/site-packages/libxml2.py", line 3588, in setProp
    if ret is None:raise treeError('xmlSetProp() failed')
libxml2.treeError: xmlSetProp() failed
make[3]: *** [Makefile:602: pt/pt.stamp] Error 1
make[3]: Leaving directory '/rootdir/gsearchtool/help'
make[2]: *** [Makefile:443: all-recursive] Error 1
make[2]: Leaving directory '/rootdir/gsearchtool'
make[1]: *** [Makefile:511: all-recursive] Error 1
make[1]: Leaving directory '/rootdir'
make: *** [Makefile:443: all] Error 2
!!! ERROR: run command [docker exec -t mate-utils-fedora-build /rootdir/src_build].
The command "./docker-build --name ${DISTRO} --verbose --config .travis.yml --build autotools" exited with 1.

@sc0w sc0w requested a review from a team March 3, 2019 13:43
@raveit65
Copy link
Member

raveit65 commented Mar 3, 2019

travis fails in fedora:

Known issue
#210
itstool/itstool#36
This can happen randomly with every language.
And it is possible that this error will be gone if you start build again.

@raveit65
Copy link
Member

raveit65 commented Mar 3, 2019

Now, the build passed :)

Copy link
Member

@lukefromdc lukefromdc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A build with my normal build options (not messing with -Werror) builds everything fine.
mate-search-tool runs as before
mate-disk-usage-analyzer runs as before
mate-system-log runs as before
mate-dictionary runs same as before both from the panel applet and from the command line. Note that if from the command line you look up something NOT in the database (e.g. the string "test2") and then afterwards run a valid lookup (I used the string "test") you get
(mate-dictionary:9199): Gdict-CRITICAL **: 17:03:45.914: _gdict_show_error_dialog: assertion 'GTK_IS_WIDGET (widget)' failed

both with this PR and with master, so for this PR it can be disregarded.

@lukefromdc lukefromdc requested a review from a team March 3, 2019 22:09
@lukefromdc
Copy link
Member

Build with
export CFLAGS="-Werror=cast-function-type -Wno-deprecated-declarations"
also completed fine

In addition, it removes unnecessary function type casts like:
  (GDestroyNotify) g_object_unref
  (GDestroyNotify) g_free
@rbuj rbuj merged commit 13a56b2 into master Apr 9, 2019
@rbuj rbuj deleted the gcc8-cast-function-type branch April 9, 2019 19:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants