[SCM] Debian packaging of DBD-Firebird CPAN distribution branch, master, updated. 734129c51950f86f5c59658ca65f95da9bbc87ab
Damyan Ivanov
dmn at debian.org
Tue Aug 30 09:02:38 UTC 2011
The following commit has been merged in the master branch:
commit c9629e7aedc2ddc79358a00fb32d8b0c2911003b
Author: Damyan Ivanov <dmn at debian.org>
Date: Tue Aug 30 11:46:41 2011 +0300
add fix-warnings.patch, fixing compiler warnings
diff --git a/debian/patches/fix-warnings.patch b/debian/patches/fix-warnings.patch
new file mode 100644
index 0000000..3cf4464
--- /dev/null
+++ b/debian/patches/fix-warnings.patch
@@ -0,0 +1,161 @@
+Description: Fix compile-time warnings in the code
+Author: Damyan Ivanov <dmn at debian.org>
+Forwarded: no
+
+--- a/dbdimp.c
++++ b/dbdimp.c
+@@ -11,6 +11,8 @@
+ */
+
+ #include "Firebird.h"
++#include <stdint.h>
++#include <inttypes.h>
+
+ DBISTATE_DECLARE;
+
+@@ -29,12 +31,14 @@ do {
+ #define IB_alloc_sqlda(sqlda, n) \
+ do { \
+ short len = n; \
++ char *tmp; \
+ if (sqlda) \
+ { \
+ Safefree(sqlda); \
+ sqlda = NULL; \
+ } \
+- Newxz(sqlda, XSQLDA_LENGTH(len), char); \
++ Newxz(tmp, XSQLDA_LENGTH(len), char); \
++ sqlda = (XSQLDA*)tmp; \
+ sqlda->sqln = len; \
+ sqlda->version = SQLDA_OK_VERSION; \
+ } while (0)
+@@ -45,7 +49,7 @@ int create_cursor_name(SV *sth, imp_sth_
+ ISC_STATUS status[ISC_STATUS_LENGTH];
+
+ Newxz(imp_sth->cursor_name, 22, char);
+- sprintf(imp_sth->cursor_name, "perl%016.16x", imp_sth->stmt);
++ sprintf(imp_sth->cursor_name, "perl%16.16"PRIx32, (uint32_t)imp_sth->stmt);
+ isc_dsql_set_cursor_name(status, &(imp_sth->stmt), imp_sth->cursor_name, 0);
+ if (ib_error_check(sth, status))
+ return FALSE;
+@@ -1168,7 +1172,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+ * of rows that the SELECT will return.
+ */
+
+- DBI_TRACE_imp_xxh(imp_sth, 3, (DBIc_LOGPIO(imp_sth), "dbd_st_fetch: fetch result: %d\n", fetch));
++ DBI_TRACE_imp_xxh(imp_sth, 3, (DBIc_LOGPIO(imp_sth), "dbd_st_fetch: fetch result: %"PRIdPTR"\n", fetch));
+
+ if (imp_sth->fetched < 0)
+ imp_sth->fetched = 0;
+@@ -1310,7 +1314,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+ if (remainder < 0) remainder = -remainder;
+
+ snprintf(buf, sizeof(buf),
+- "%"DBD_IB_INT64f".%0.*"DBD_IB_INT64f,
++ "%"DBD_IB_INT64f".%.*"DBD_IB_INT64f,
+ i/divisor, -var->sqlscale, remainder);
+ DBI_TRACE_imp_xxh(imp_sth, 3, (DBIc_LOGPIO(imp_sth), "-------------->SQLINT64=%"DBD_IB_INT64f".%0.*"DBD_IB_INT64f,i/divisor, -var->sqlscale, remainder ));
+
+@@ -1436,7 +1440,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+ #else
+ case SQL_TIMESTAMP:
+ #endif
+- sprintf(buf, "%04d-%02d-%02d %02d:%02d:%02d.%04d",
++ sprintf(buf, "%04d-%02d-%02d %02d:%02d:%02d.%04ld",
+ times.tm_year + 1900,
+ times.tm_mon + 1,
+ times.tm_mday,
+@@ -1454,7 +1458,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+ break;
+
+ case SQL_TYPE_TIME:
+- sprintf(buf, "%02d:%02d:%02d.%04d",
++ sprintf(buf, "%02d:%02d:%02d.%04ld",
+ times.tm_hour,
+ times.tm_min,
+ times.tm_sec,
+@@ -1516,7 +1520,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+
+ case SQL_BLOB:
+ {
+- isc_blob_handle blob_handle = NULL;
++ isc_blob_handle blob_handle = 0;
+ int blob_stat;
+ char blob_info_buffer[32], *p,
+ blob_segment_buffer[BLOB_SEGMENT];
+@@ -1533,7 +1537,7 @@ AV *dbd_st_fetch(SV *sth, imp_sth_t *imp
+ &blob_handle, (ISC_QUAD *) var->sqldata,
+ #if defined(INCLUDE_FB_TYPES_H) || defined(INCLUDE_TYPES_PUB_H)
+ (ISC_USHORT) 0,
+- (ISC_UCHAR) NULL);
++ (ISC_UCHAR) 0);
+ #else
+ (short) 0, /* no Blob filter */
+ (char *) NULL); /* no Blob filter */
+@@ -1987,7 +1991,7 @@ int dbd_discon_all(SV *drh, imp_drh_t *i
+ int ib_blob_write(SV *sth, imp_sth_t *imp_sth, XSQLVAR *var, SV *value)
+ {
+ D_imp_dbh_from_sth;
+- isc_blob_handle handle = NULL;
++ isc_blob_handle handle = 0;
+ ISC_STATUS status[ISC_STATUS_LENGTH];
+ long total_length;
+ char *p, *seg;
+@@ -2021,7 +2025,7 @@ int ib_blob_write(SV *sth, imp_sth_t *im
+ seg_len = BLOB_SEGMENT;
+ while (total_length > 0)
+ {
+- DBI_TRACE_imp_xxh(imp_sth, 3, (DBIc_LOGPIO(imp_sth), "ib_blob_write: %d bytes left\n", total_length));
++ DBI_TRACE_imp_xxh(imp_sth, 3, (DBIc_LOGPIO(imp_sth), "ib_blob_write: %ld bytes left\n", total_length));
+
+ /* set new segment start pointer */
+ seg = p;
+@@ -2084,7 +2088,7 @@ static int ib_fill_isqlda(SV *sth, imp_s
+
+ DBI_TRACE_imp_xxh(imp_sth, 2, (DBIc_LOGPIO(imp_sth), "enter ib_fill_isqlda. processing %d XSQLVAR"
+ " Type %ld"
+- " ivar->sqltype=%ld\n",
++ " ivar->sqltype=%d\n",
+ i + 1,
+ (long) sql_type,
+ ivar->sqltype));
+@@ -2169,7 +2173,7 @@ static int ib_fill_isqlda(SV *sth, imp_s
+ if (len > ivar->sqllen) {
+ char err[80];
+ sprintf(err, "String truncation (SQL_VARYING): attempted to bind %lu octets to column sized %lu",
+- len, (sizeof(char) * (ivar->sqllen)));
++ (long unsigned)len, (long unsigned)(sizeof(char) * (ivar->sqllen)));
+ break;
+ }
+
+@@ -2192,7 +2196,7 @@ static int ib_fill_isqlda(SV *sth, imp_s
+ if (len > ivar->sqllen) {
+ char err[80];
+ sprintf(err, "String truncation (SQL_TEXT): attempted to bind %lu octets to column sized %lu",
+- len, (sizeof(char) * (ivar->sqllen)));
++ (long unsigned)len, (long unsigned)(sizeof(char) * (ivar->sqllen)));
+ break;
+ }
+
+@@ -2677,8 +2681,8 @@ int ib_commit_transaction(SV *h, imp_dbh
+ ISC_STATUS status[ISC_STATUS_LENGTH];
+
+ DBI_TRACE_imp_xxh(imp_dbh, 4, (DBIc_LOGPIO(imp_dbh),
+- "ib_commit_transaction: DBIcf_AutoCommit = %d, imp_dbh->sth_ddl = %d\n",
+- DBIc_has(imp_dbh, DBIcf_AutoCommit), imp_dbh->sth_ddl));
++ "ib_commit_transaction: DBIcf_AutoCommit = %lu, imp_dbh->sth_ddl = %u\n",
++ (long unsigned)DBIc_has(imp_dbh, DBIcf_AutoCommit), imp_dbh->sth_ddl));
+
+ if (!imp_dbh->tr)
+ {
+--- a/Firebird.xs
++++ b/Firebird.xs
+@@ -1320,7 +1320,7 @@ ib_wait_event(dbh, ev)
+ {
+ if (ecount[i])
+ {
+- DBI_TRACE_imp_xxh(imp_dbh, 2, (DBIc_LOGPIO(imp_dbh), "Event %s caught %ld times.\n", *(ev->names + i), ecount[i]));
++ DBI_TRACE_imp_xxh(imp_dbh, 2, (DBIc_LOGPIO(imp_dbh), "Event %s caught %lu times.\n", *(ev->names + i), (long unsigned)ecount[i]));
+ svp = hv_store(RETVAL, *(ev->names + i), strlen(*(ev->names + i)),
+ newSViv(ecount[i]), 0);
+ if (svp == NULL)
--
Debian packaging of DBD-Firebird CPAN distribution
More information about the Pkg-perl-cvs-commits
mailing list