! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Remove pure attribute from non pure function
Status:
RESOLVED: FIXED

Comments

Description Andre Miranda editbugs 2018-06-02 05:45:25 CEST
Created attachment 7767 
Remove-pure-attribute-of-function-that-returns-void.patch

According to GCC's manual[1]:
"(...) Because a pure function cannot have any side effects it does not make sense for such a function to return void. Declaring such a function is diagnosed."

The attached patch removes this attribute of "void exo_noop (void)" thus eliminating warnings emitted by recent versions of GCC.

1 - https://gcc.gnu.org/onlinedocs/gcc/Common-Function-Attributes.html#Common-Function-Attributes
Comment 1 Git Bot editbugs 2018-06-06 03:35:23 CEST
Andre Miranda referenced this bugreport in commit 0406e7e44edae712537d84035539a484c1eaa26a

Remove pure attribute of function that returns void (bug 14427)

https://git.xfce.org/xfce/exo/commit?id=0406e7e44edae712537d84035539a484c1eaa26a
Comment 2 Sean Davis editbugs 2018-06-06 03:36:02 CEST
Thanks for the patch! Applied at the above commit.

Bug #14427

Reported by:
Andre Miranda
Reported on: 2018-06-02
Last modified on: 2018-06-06

People

Assignee:
Nick Schermer
CC List:
2 users

Version

Attachments

Additional information