Skip to content

Commit f1e5d53

Browse files
committed
Fixed unused variable / self-assignment compiler warnings
git-svn-id: https://svn.perl.org/modules/dbi/trunk@15353 50811bd7-b8ce-0310-adc1-d9db26280581
1 parent 1e5cb22 commit f1e5d53

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

Driver.xst

+5-5
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ REQUIRE: 1.929
1515
PROTOTYPES: DISABLE
1616

1717
BOOT:
18-
items = 0; /* avoid 'unused variable' warning */
18+
PERL_UNUSED_VAR(items);
1919
DBISTATE_INIT;
2020
/* XXX this interface will change: */
2121
DBI_IMP_SIZE("DBD::~DRIVER~::dr::imp_data_size", sizeof(imp_drh_t));
@@ -46,7 +46,7 @@ discon_all_(drh)
4646
disconnect_all = 1
4747
CODE:
4848
D_imp_drh(drh);
49-
if (0) ix = ix; /* avoid unused variable warning */
49+
PERL_UNUSED_VAR(ix);
5050
ST(0) = dbd_discon_all(drh, imp_drh) ? &PL_sv_yes : &PL_sv_no;
5151

5252
#endif /* dbd_discon_all */
@@ -623,7 +623,7 @@ fetchrow_arrayref(sth)
623623
CODE:
624624
D_imp_sth(sth);
625625
AV *av;
626-
if (0) ix = ix; /* avoid unused variable warning */
626+
PERL_UNUSED_VAR(ix);
627627
av = dbd_st_fetch(sth, imp_sth);
628628
ST(0) = (av) ? sv_2mortal(newRV((SV *)av)) : &PL_sv_undef;
629629

@@ -644,7 +644,7 @@ fetchrow_array(sth)
644644
for(i=0; i < num_fields; ++i) {
645645
PUSHs(AvARRAY(av)[i]);
646646
}
647-
if (0) ix = ix; /* avoid unused variable warning */
647+
PERL_UNUSED_VAR(ix);
648648
}
649649

650650

@@ -731,7 +731,7 @@ FETCH_attrib(sth, keysv)
731731
CODE:
732732
D_imp_sth(sth);
733733
SV *valuesv;
734-
if (0) ix = ix; /* avoid unused variable warning */
734+
PERL_UNUSED_VAR(ix);
735735
valuesv = dbd_st_FETCH_attrib(sth, imp_sth, keysv);
736736
if (!valuesv)
737737
valuesv = DBIc_DBISTATE(imp_sth)->get_attr(sth, keysv);

Driver_xst.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ dbixst_bounce_method(char *methname, int params)
2828
if (debug >= 3) {
2929
PerlIO_printf(DBIc_LOGPIO(imp_xxh),
3030
" -> %s (trampoline call with %d (%ld) params)\n", methname, params, (long)items);
31-
xxx = xxx; /* avoid unused var warning */
31+
PERL_UNUSED_VAR(xxx);
3232
}
3333
EXTEND(SP, params);
3434
PUSHMARK(SP);

dbixs_rev.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* Wed Apr 18 12:37:44 2012 */
2-
/* Mixed revision working copy (15267M:15268) */
1+
/* Fri Jul 13 13:29:50 2012 */
2+
/* Mixed revision working copy (15349M:15352) */
33
/* Code modified since last checkin */
4-
#define DBIXS_REVISION 15267
4+
#define DBIXS_REVISION 15349

0 commit comments

Comments
 (0)