[MacPorts] #71488: php83-rar @4.2.0: rararch.c:547:12: error: conflicting types for 'rararch_count_elements'

MacPorts noreply at macports.org
Sun Dec 8 12:59:36 UTC 2024


#71488: php83-rar @4.2.0: rararch.c:547:12: error: conflicting types for
'rararch_count_elements'
----------------------------+------------------------
  Reporter:  slightlybeige  |      Owner:  ryandesign
      Type:  defect         |     Status:  assigned
  Priority:  Normal         |  Milestone:
 Component:  ports          |    Version:  2.10.5
Resolution:                 |   Keywords:
      Port:  php83-rar      |
----------------------------+------------------------

Comment (by ryandesign):

 Replying to [ticket:71488 slightlybeige]:
 > {{{
 >
 /opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports
 .org_macports_release_tarballs_ports_php_php-
 rar/php83-rar/work/rar-4.2.0/rararch.c:109:26: note: previous declaration
 is here
 >   109 | static ZEND_RESULT_CODE *rararch_count_elements(handler_this_t
 *object, long *count TSRMLS_DC);
 >       |                          ^
 > }}}

 I'm confused by the error message you received because `ZEND_RESULT_CODE
 *` is not the return type on that line of that file; `int` is.
 `ZEND_RESULT_CODE` doesn't seem to appear anywhere within the rar module's
 code.

 When I build the port with MacPorts clang 19 on macOS 12 the error I get
 is:

 {{{
 /path/to/rar-4.2.0/rararch.c:1244:42: error: incompatible function pointer
 types assigning to 'zend_object_count_elements_t' (aka 'ZEND_RESULT_CODE
 (*)(struct _zend_object *, long long *)') from 'int (handler_this_t *,
 long *)' (aka 'int (struct _zend_object *, long *)') [-Wincompatible-
 function-pointer-types]
  1244 |         rararch_object_handlers.count_elements  =
 rararch_count_elements;
       |                                                 ^
 ~~~~~~~~~~~~~~~~~~~~~~
 }}}

 Could it be that you experienced that error, then tried to fix it by
 changing the return type from `int` to `ZEND_RESULT_CODE *`, then
 encountered the `conflicting types for 'rararch_count_elements'` error and
 reported it?

-- 
Ticket URL: <https://trac.macports.org/ticket/71488#comment:2>
MacPorts <https://www.macports.org/>
Ports system for macOS


More information about the macports-tickets mailing list