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

Enable -Wundef compiler warning #5526

Open
wants to merge 16 commits into
base: master
from
Open

Conversation

@Girgias
Copy link
Member

@Girgias Girgias commented May 5, 2020

This is not enabled by -Wextra and seems like something sane to have which is not much effort to make work.

Except for this one:

In file included from Zend/zend_language_scanner.l:38:0:
Zend/zend_language_parser.h:38:5: warning: "YYDEBUG" is not defined [-Wundef]
 #if YYDEBUG
     ^

Which is generated by Bison but I also don't understand why the compilers are complaining as the generated code is (at least locally):

/* Debug traces.  */
#ifndef ZENDDEBUG
# if defined YYDEBUG
#if YYDEBUG
#   define ZENDDEBUG 1
#  else
#   define ZENDDEBUG 0
#  endif
# else /* ! defined YYDEBUG */
#  define ZENDDEBUG 0
# endif /* ! defined YYDEBUG */
#endif  /* ! defined ZENDDEBUG */

Note, I realized that the following macros are always defined, but only on Windows:

AC_DEFINE('HAVE_GAI_STRERROR', main_network_has_ipv6);
AC_DEFINE('HAVE_IPV6', main_network_has_ipv6);

Fixed with: ca6dd7e

AC_DEFINE('HAVE_GETADDRINFO', main_network_has_ipv6);
See https://heap.space/xref/php-src/win32/build/config.w32?r=84854a72#283

Review list:

  • Extensions:
    • BCMath
    • BZ2
    • Calendar
    • COM_DotNet
    • CType
    • cURL
    • Date
    • DBA
    • Dom
    • Enchant: about HAVE_ENCHANT_BROKER_SET_PARAM or need to always be defined for Nux* or need to drop always defined on Windows and adjust #if/#ifdef accordingly
    • EXIF
    • FFI - does #if FFI_CLOSURES need to be #ifdef FFI_CLOSURES?
    • Fileinfo
    • Filter
    • FTP
    • GD
    • GetText
    • GMP
    • Hash
    • Iconv
    • IMAP
    • INTL
    • JSON
    • LDAP
    • LibXML
    • MBString
    • MySQLi
    • MySQLnd
    • OCI8 - currently bundling with #5603
    • ODBC
    • OpCache - Needs to be reviewed
    • OpenSSL
    • PCNTL
    • PCRE
    • PDO
    • PDO_DBLIB
    • PDO_FIREBIRD
    • PDO_MYSQL
    • PDO_OCI
    • PDO_ODBC
    • PDO_PGSQL
    • PDO_SQLite
    • PGSQL
    • PHAR
    • POSIX
    • PSpell
    • Readline
    • Reflection
    • Session
    • SHMOP
    • SimpleXML
    • Skeleton
    • SNMP - Need to resolve HAVE_GETADDRINFO issue before finished
    • Soap
    • Sockets - Need to resolve HAVE_GETADDRINFO issue before finished
    • Sodium
    • SPL
    • SQLite3
    • Standard:
      • base64
    • Sysvmsg
    • Sysvsem
    • Sysvshm
    • Tidy
    • Tokenizer
    • XML
    • XMLReader
    • XMLRPC Ignoring this as it's getting unbundled
    • XMLWriter
    • XSL
    • zend_test
    • ZIP
    • ZLib
  • main/
  • SAPIs:
    • Apache2Handler
    • CGI
    • CLI (may want to reconfirm)
    • Embed
    • FPM (may want to reconfirm)
    • Fuzzer
    • LiteSpeed
    • PHPDBG (may want to reconfirm)
  • TSRM
  • Win32
  • Zend/
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 3 times, most recently from 04ee8ee to 2da480a May 5, 2020
@Girgias Girgias marked this pull request as draft May 5, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch from 2da480a to 2d52c13 May 5, 2020
@Girgias Girgias mentioned this pull request May 5, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 2 times, most recently from d789c7a to a32cc30 May 5, 2020
@Girgias Girgias marked this pull request as ready for review May 6, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 2 times, most recently from 1d9f817 to ed23794 May 12, 2020
@Girgias Girgias mentioned this pull request May 13, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 2 times, most recently from ce4316d to 5c19ecf May 15, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 5 times, most recently from 9cff451 to c6fad3d May 17, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 2 times, most recently from 91b2ad7 to b859ca2 May 20, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch from b859ca2 to 5ea966d Jun 10, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch 3 times, most recently from 5ddec73 to 1e4cf4f Aug 7, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch from 1e4cf4f to ec13b80 Sep 3, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch from ec13b80 to b84801e Sep 22, 2020
@Girgias Girgias force-pushed the Girgias:undef-compiler-warning branch from b84801e to 0057709 Sep 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants