[svn:dbd-oracle] r12551 - dbd-oracle/trunk

[email protected]
Newsgroups perl.dbd.oracle.changes
Message-ID <[email protected]>
Author: byterock
Date: Fri Feb 27 09:08:16 2009
New Revision: 12551

Modified:
   dbd-oracle/trunk/Changes
   dbd-oracle/trunk/dbdimp.c
   dbd-oracle/trunk/oci8.c
   dbd-oracle/trunk/ocitrace.h

Log:
 Fix for some warnings and one bug in ocitrace.h from Charles Jardine


Modified: dbd-oracle/trunk/Changes
==============================================================================
--- dbd-oracle/trunk/Changes	(original)
+++ dbd-oracle/trunk/Changes	Fri Feb 27 09:08:16 2009
@@ -1,4 +1,5 @@
 =head1 Changes in DBD-Oracle 1.23(svn rev #####)
+  Fix for some warnings and one bug in ocitrace.h from Charles Jardine
   Fix in case there may be a bug in 11 where the OCI_ATTR_DATA_SIZE my return 0 which should never happen, John Scoles
   Fix on the Makefile.PL for a possible sql bug in IC from Martin Evans
   Added a change from a suggestion from Martin Evans for making ref cursors faster.

Modified: dbd-oracle/trunk/dbdimp.c
==============================================================================
--- dbd-oracle/trunk/dbdimp.c	(original)
+++ dbd-oracle/trunk/dbdimp.c	Fri Feb 27 09:08:16 2009
@@ -1079,7 +1079,7 @@
 bufp = SvPV(source, len);
 
 	if (DBIS->debug >=3 || dbd_verbose >= 3 )
-		PerlIO_printf(DBILOGFP, " creating xml from string that is %d long\n",len);
+		PerlIO_printf(DBILOGFP, " creating xml from string that is %lu long\n",len);
 
 	if(len > MAX_OCISTRING_LEN) {
 		src_type = OCI_XMLTYPE_CREATE_CLOB;
@@ -1568,16 +1568,16 @@
 			phs->array_lengths[i]=itemlen+1; /* Zero byte */
 			if (trace_level >= 3 || dbd_verbose >= 3 ){
 			PerlIO_printf(DBILOGFP, "dbd_rebind_ph_varchar2_table(): "
-				"Copying length=%d array[%d]='%s'.\n",
-				itemlen,i,str);
+				"Copying length=%lu array[%d]='%s'.\n",
+				(unsigned long)itemlen,i,str);
 			}
 		}else{
 			/* Mark NULL */
 			phs->array_indicators[i]=1;
 			if (trace_level >= 3 || dbd_verbose >= 3 ){
 			PerlIO_printf(DBILOGFP, "dbd_rebind_ph_varchar2_table(): "
-				"Copying length=%d array[%d]=NULL (length==0 or ! str) .\n",
-				itemlen,i);
+				"Copying length=%lu array[%d]=NULL (length==0 or ! str) .\n",
+				(unsigned long)itemlen,i);
 			}
 		}
 		}else{
@@ -1608,10 +1608,10 @@
 	return 0;
 	}
 	OCIBindArrayOfStruct_log_stat(phs->bndhp, imp_sth->errhp,
-		(unsigned)phs->maxlen,  /* Skip parameter for the next data value */
-		sizeof (OCIInd),		/* Skip parameter for the next indicator value */
-		sizeof(unsigned short), /* Skip parameter for the next actual length value */
-		0,					  /* Skip parameter for the next column-level error code */
+		(unsigned)phs->maxlen,			/* Skip parameter for the next data value */
+		(unsigned)sizeof (OCIInd),		/* Skip parameter for the next indicator value */
+		(unsigned)sizeof(unsigned short), /* Skip parameter for the next actual length value */
+		0,					  			/* Skip parameter for the next column-level error code */
 		status);
 	if (status != OCI_SUCCESS) {
 	oci_error(sth, imp_sth->errhp, status, "OCIBindArrayOfStruct");
@@ -2017,10 +2017,10 @@
 	return 0;
 	}
 	OCIBindArrayOfStruct_log_stat(phs->bndhp, imp_sth->errhp,
-		(unsigned)phs->maxlen,  /* Skip parameter for the next data value */
-		sizeof (OCIInd),		/* Skip parameter for the next indicator value */
-		sizeof(unsigned short), /* Skip parameter for the next actual length value */
-		0,					  /* Skip parameter for the next column-level error code */
+		(unsigned)phs->maxlen,			/* Skip parameter for the next data value */
+		(unsigned)sizeof(OCIInd),		/* Skip parameter for the next indicator value */
+		(unsigned)sizeof(unsigned short), /* Skip parameter for the next actual length value */
+		0,								/* Skip parameter for the next column-level error code */
 		status);
 	if (status != OCI_SUCCESS) {
 	oci_error(sth, imp_sth->errhp, status, "OCIBindArrayOfStruct");

Modified: dbd-oracle/trunk/oci8.c
==============================================================================
--- dbd-oracle/trunk/oci8.c	(original)
+++ dbd-oracle/trunk/oci8.c	Fri Feb 27 09:08:16 2009
@@ -3751,7 +3751,7 @@
 		phs_t *phs;
 		SV **phs_svp = hv_fetch(imp_sth->all_params_hv, fbh->name,strlen(fbh->name), 0);
 		if (!phs_svp)
-			croak("panic: LOB refetch for '%s' param (%ld) - name not found",fbh->name,i+1);
+			croak("panic: LOB refetch for '%s' param (%d) - name not found",fbh->name,i+1);
 		phs = (phs_t*)(void*)SvPVX(*phs_svp);
 		fbh->special = phs;
 		if (DBIS->debug >= 3 || dbd_verbose >= 3 )

Modified: dbd-oracle/trunk/ocitrace.h
==============================================================================
--- dbd-oracle/trunk/ocitrace.h	(original)
+++ dbd-oracle/trunk/ocitrace.h	Fri Feb 27 09:08:16 2009
@@ -50,8 +50,8 @@
 	stat =OCIStmtGetPieceInfo(stmhp,errhp,hdlptr,hdltyp,in_out,iter,idx,piece);\
 	(DBD_OCI_TRACEON) \
 			? PerlIO_printf(DBD_OCI_TRACEFP,\
- 				 "%sOCIStmtGetPieceInfo_log_stat(%p,%p,%u)=%s\n",\
- 				 OciTp, (void*)errhp,fbh,(unsigned int)piece,oci_status_name(stat)),stat \
+				"%sOCIStmtGetPieceInfo_log_stat(%p,%p,%u)=%s\n",\
+				OciTp, (void*)errhp,fbh,*piece,oci_status_name(stat)),stat \
 	: stat
 
 
@@ -464,9 +464,9 @@
 	stat=OCIServerAttach( imp_dbh->srvhp, imp_dbh->errhp,		\
 		(text*)dbname, (sb4)strlen(dbname), md);				\
 	(DBD_OCI_TRACEON) ? PerlIO_printf(DBD_OCI_TRACEFP,			\
-		"%sServerAttach(%p, %p, \"%s\", %d, mode=%s,%lu)=%s\n",			\
+		"%sServerAttach(%p, %p, \"%s\", %lu, mode=%s,%lu)=%s\n",			\
 		OciTp, (void*)imp_dbh->srvhp,(void*)imp_dbh->errhp, dbname,	\
-		strlen(dbname), oci_mode(md),ul_t(md),oci_status_name(stat)),stat : stat
+		ul_t(strlen(dbname)), oci_mode(md),ul_t(md),oci_status_name(stat)),stat : stat
 
 #define OCIStmtExecute_log_stat(sv,st,eh,i,ro,si,so,md,stat)			\
 	stat=OCIStmtExecute(sv,st,eh,i,ro,si,so,md);			\
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.