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 incompatible pointer types (32-bit) #134

Merged
merged 1 commit into from
Feb 5, 2024
Merged

Fix incompatible pointer types (32-bit) #134

merged 1 commit into from
Feb 5, 2024

Conversation

remicollet
Copy link
Collaborator

With GCC 14 (Fedora 40) [-Wincompatible-pointer-types] becomes a error (and is indeed one)

See https://kojipkgs.fedoraproject.org//work/tasks/9963/112369963/build.log

/builddir/build/BUILD/php-pecl-http-4.2.4/pecl_http-4.2.4/src/php_http_url.c: In function 'php_http_url_from_env':
/builddir/build/BUILD/php-pecl-http-4.2.4/pecl_http-4.2.4/src/php_http_url.c:110:89: error: passing argument 3 of 'is_numeric_string' from incompatible pointer type [-Wincompatible-pointer-types]
  110 |         if (zport && IS_LONG == is_numeric_string(Z_STRVAL_P(zport), Z_STRLEN_P(zport), &port, NULL, 0)) {
      |                                                                                         ^~~~~
      |                                                                                         |
      |                                                                                         long int *
In file included from /usr/include/php/Zend/zend.h:417,
                 from /usr/include/php/main/php.h:31,
                 from /builddir/build/BUILD/php-pecl-http-4.2.4/pecl_http-4.2.4/src/php_http_api.h:31,
                 from /builddir/build/BUILD/php-pecl-http-4.2.4/pecl_http-4.2.4/src/php_http_url.c:13:
/usr/include/php/Zend/zend_operators.h:157:96: note: expected 'zend_long *' {aka 'int *'} but argument is of type 'long int *'
  157 | static zend_always_inline uint8_t is_numeric_string(const char *str, size_t length, zend_long *lval, double *dval, bool allow_errors) {
  
```    |                                                                                     ~~~~~~~~~~~^~~~

@remicollet remicollet changed the title Fix incompatible pointer types Fix incompatible pointer types (32-bit) Jan 29, 2024
Copy link

codecov bot commented Jan 29, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (ff2148e) 85.65% compared to head (88e279d) 85.62%.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #134      +/-   ##
==========================================
- Coverage   85.65%   85.62%   -0.03%     
==========================================
  Files          42       42              
  Lines        9263     9262       -1     
==========================================
- Hits         7934     7931       -3     
- Misses       1329     1331       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@remicollet
Copy link
Collaborator Author

Build with this patch applied
https://koji.fedoraproject.org/koji/taskinfo?taskID=112553589

@m6w6 m6w6 merged commit 7781f03 into master Feb 5, 2024
36 of 39 checks passed
m6w6 added a commit that referenced this pull request Feb 5, 2024
* Fix incompatible pointer types (32-bit) (see gh issue #134)
* Fix glitch in CURL_VERSION_TLSAUTH_SRP autoconf probe (see gh issue #133)
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.

2 participants