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

compiler warning #163

Open
rwfranks opened this issue Oct 28, 2024 · 0 comments
Open

compiler warning #163

rwfranks opened this issue Oct 28, 2024 · 0 comments

Comments

@rwfranks
Copy link

Transcribed verbatim from CPAN RT#129760, warts and all.

Thu Jun 06 11:11:28 2019 HVDS [...] cpan.org - Ticket created
Subject: compiler warning

Building DBI-1.642 I see this:

DBI.c: In function 'XS_DBD_____db_take_imp_data':
DBI.xs:5175:16: warning: 'mg' may be used uninitialized in this function [-Wmaybe-uninitialized]
     mg->mg_obj = Nullsv;        /* sever the link from handle to imp_xxh */
DBI.xs:5087:12: note: 'mg' was declared here
     MAGIC *mg;

Looking at the code, I see mg is intended to be supplied by the preceding call to dbih_getcom2(), but that has a couple of non-fatal failure modes signalled by returning 0, which the call here does not check for. Fixing it might require no more than to croak() if dbih_getcom2() returns false, but there may be better approaches.

Hugo

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

No branches or pull requests

1 participant