Hi,
The deprecation warning might be related to
https://github.com/perl5-dbi/dbi/pull/112 /
https://github.com/perl5-dbi/dbi/issues/110
Daniël van Eeden
On 2024-11-24 14:29, Henrique Martins wrote:
Upgraded to Fedora 41, new compiler that comes with it seems to have
-Wreturn-mismatch enabled.
When trying to install DBD::Oracle with cpan, I get this error:
dbdcnx.c:90:25: error: 'return' with no value, in function returning
non-void [-Wreturn-mismatch]
90 | if(llist_empty(el)) return;\
Looking at dbdcnx, the llist_drop(ael) macro does contain the return
line above.
The macro is used in functions
release_env, which returns a void
find_env, which returns a env_box_t*
release_pool, which returns a void
and the call within find_env needs a "return NULL;" instead.
I was able to make it compile with two (silly) methods
- duplicated the macro with
return NULL
instead of
return
called it from find_env
- added argument to the macro
llist_drop(ael, ret)
called it as
llist_drop(&box->base.lock, return);
or
llist_drop(&box->base.lock, return NULL);
where appropriate.
Both approaches compile, have the first one in place, will try the
second later.
-- Henrique
-----------------------------------------------------------------
I also get a deprecation warning as below, didn't look at it
Oracle.xs: In function 'XS_DBD__Oracle__st_ora_fetch':
Oracle.xs:233:9: warning: 'Perl_dowantarray' is deprecated
[-Wdeprecated-declarations]
233 | if (GIMME == G_SCALAR) { /* XXX Oraperl */
| ^~
In file included from /usr/lib64/perl5/CORE/perl.h:6186,
from /usr/lib64/perl5/vendor_perl/auto/DBI/DBIXS.h:23,
from Oracle.h:50,
from Oracle.xs:1:
/usr/lib64/perl5/CORE/proto.h:1031:1: note: declared here
1031 | Perl_dowantarray(pTHX)