Skip to content

Autotools: Simplify adding tidy cflags #15577

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

Merged
merged 2 commits into from
Aug 25, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions ext/tidy/config.m4
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ if test "$PHP_TIDY" != "no"; then
PHP_ADD_INCLUDE([$TIDY_INCDIR])

dnl Add -Wno-ignored-qualifiers as this is an issue upstream
Copy link
Member

Choose a reason for hiding this comment

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

Is this still a problem upstream? Unfortunately 1393834 that added this doesn't seem to reference anything...

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, still happening with tidy-html5 versions before 5.7.20:

/usr/include/tidy/tidy.h:2095:13: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 2095 | TIDY_EXPORT const ctmbstr TIDY_CALL TidyLangWindowsName( const tidyLocaleMapItem *item );
      |             ^~~~~
/usr/include/tidy/tidy.h:2101:13: warning: type qualifiers ignored on function return type [-Wignored-qualifiers]
 2101 | TIDY_EXPORT const ctmbstr TIDY_CALL TidyLangPosixName( const tidyLocaleMapItem *item );
      |             ^~~~~

htacg/tidy-html5#866

TIDY_COMPILER_FLAGS="$TIDY_CFLAGS -Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1"
PHP_NEW_EXTENSION([tidy], [tidy.c], [$ext_shared],, [$TIDY_COMPILER_FLAGS])
PHP_NEW_EXTENSION([tidy],
[tidy.c],
[$ext_shared],,
[-Wno-ignored-qualifiers -DZEND_ENABLE_STATIC_TSRMLS_CACHE=1])
PHP_SUBST([TIDY_SHARED_LIBADD])
AC_DEFINE([HAVE_TIDY], [1],
[Define to 1 if the PHP extension 'tidy' is available.])
Expand Down
Loading