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 669344 - Don't use 'restrict' keyword as variable name
Don't use 'restrict' keyword as variable name
Status: RESOLVED FIXED
Product: at-spi
Classification: Platform
Component: at-spi2-core
unspecified
Other FreeBSD
: Normal trivial
: ---
Assigned To: Li Yuan
Depends on:
Blocks:
 
 
Reported: 2012-02-03 21:02 UTC by Yuri Pankov
Modified: 2012-02-03 23:23 UTC
See Also:
GNOME target: ---
GNOME version: 3.1/3.2


Attachments
restrict -> a_restrict (848 bytes, patch)
2012-02-03 21:02 UTC, Yuri Pankov
none Details | Review

Description Yuri Pankov 2012-02-03 21:02:55 UTC
Created attachment 206728 [details] [review]
restrict -> a_restrict

Build of at-spi2-core 2.2.3 fails with clang:

libtool: compile:  clang -DHAVE_CONFIG_H -I. -I.. -I/usr/local/include -I/usr/local/include -I/usr/local/include/dbus-1.0 -I/usr/local/include/dbus-1.0/include -I/usr/local/include/glib-2.0 -I../registryd -I.. -O2 -pipe -fno-strict-aliasing -Werror-implicit-function-declaration -MT libatspi_la-atspi-collection.lo -MD -MP -MF .deps/libatspi_la-atspi-collection.Tpo -c atspi-collection.c  -fPIC -DPIC -o .libs/libatspi_la-atspi-collection.o
atspi-collection.c:190:40: error: restrict requires a pointer or reference ('gboolean' (aka 'int') is invalid)
                              gboolean restrict,
                              ~~~~~~~~~^~~~~~~~
atspi-collection.c:190:48: error: parameter name omitted
                              gboolean restrict,
                                               ^
atspi-collection.c:199:28: error: expected expression
  dbus_bool_t d_restrict = restrict;
Comment 1 Yuri Pankov 2012-02-03 21:10:35 UTC
Of course, using -std=gnu89 helps here, just thought it would be better to change this anyway.
Comment 2 Mike Gorse 2012-02-03 23:23:11 UTC
I'd rather just rename the parameter, so I've just pushed 1fe074, renaming it
to limit_scope.

Thanks for the report.