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