[freetds] bulk library in ct-lib

Thompson, Bill D (London) bill_d_thompson at ml.com
Tue May 18 04:43:00 EDT 2004


Freddy,

> dblib.c: In function `dbnullbind':
> dblib.c:2125: warning: assignment from incompatible pointer type
> dblib.c: In function `dbanullbind':
> dblib.c:2182: warning: assignment from incompatible pointer type

Line 2125 and 2182:

-    colinfo->column_nullbind = (TDS_CHAR *) indicator;
+    colinfo->column_nullbind = (TDS_SMALLINT *) indicator;

> blk.c: In function `blk_bind':
> blk.c:98: warning: overflow in implicit constant conversion
> blk.c:99: warning: overflow in implicit constant conversion
> blk.c:121: warning: overflow in implicit constant conversion
> blk.c:122: warning: overflow in implicit constant conversion

In CVS I see these lines as....

  96                		/* clear all bindings */
  97                		if (datafmt == NULL && buffer == NULL &&
datalen == NULL && indicator == NULL ) { 
  98                			blkdesc->bind_count = CS_UNUSED;
  99                			for (i = 0; i <
blkdesc->bindinfo->num_cols; i++ ) {
 100                				colinfo =
blkdesc->bindinfo->columns[i];

and 

 119                	/* clear bindings for this column */
 120                
 121                	if (datafmt == NULL && buffer == NULL && datalen ==
NULL && indicator == NULL ) { 
 122                
 123 freddy77   1.8 		colinfo = blkdesc->bindinfo->columns[item -
1];

...so I'm a bit confused by the line numbers...

The variables being compared to NULL are all pointers of various types
blkdesc->bind_count is a TDS_INT and CS_UNUSED is #define CS_UNUSED
-99999

can you send me lines 96 thru 123 of the code as you see it ?

...my rpc_ct_setparam test is not doing the same as yours...

Thanks for the help,

Bill

 



> -----Original Message-----
> From:	ZIGLIO, Frediano, VF-IT [SMTP:Frediano.Ziglio at vodafone.com]
> Sent:	18 May 2004 09:18
> To:	FreeTDS Development Group
> Subject:	RE: [freetds] bulk library in ct-lib
> 
> > 
> > well thanks a lot freddy,
> > 
> > your compiler is more fussy than mine....
> > 
> > > you called _ctclientmsg in blk.c with less parameters...
> > 
> > yeah, I guess whereever I do this
> > 
> > _ctclient_msg(blkdesc->con, "blk_done", 2, 5, 1, 140);
> > 
> > You could change it to...
> > 
> > _ctclient_msg(blkdesc->con, "blk_done", 2, 5, 1, 140, "");
> > 
> > Your line numbers don't seem to the same as mine at the 
> > moment so I can't
> > find the others...
> > 
> > Bill
> > 
> 
> Don't mind, replaced
> 
> Still some warnings that look quite severe
> 
> blk.c: In function `blk_bind':
> blk.c:98: warning: overflow in implicit constant conversion
> blk.c:99: warning: overflow in implicit constant conversion
> blk.c:121: warning: overflow in implicit constant conversion
> blk.c:122: warning: overflow in implicit constant conversion
> 
> The constant seems not valid
> 
> dblib.c: In function `dbnullbind':
> dblib.c:2125: warning: assignment from incompatible pointer type
> dblib.c: In function `dbanullbind':
> dblib.c:2182: warning: assignment from incompatible pointer type
> 
> Bad conversion of pointer...
> 
> 
> blk_in.c: In function `do_bind':
> blk_in.c:201: warning: control reaches end of non-void function
> 
> You used ret but you always discard this value...
> 
> 
> 
> Also see some results from make check
> 
> 000000000000000000000000000000000000000000000000000000000000000000000000
> 00000000
> 000000000000000000000000000000000000000000000000000000000000000000000000
> 00000000
> 000000000000000000000000000000000000000000000000000000000000000000000000
> 00000000
> 000000000000000000000000000000000000000000000000000000000000000000000000
> 00000000
> 00000000000000000000000
> All done processing rows.
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> free(): invalid pointer 0xbfffe756!
> PASS: rpc_ct_setparam
> 
> ^^^ double free ??
> 
> FAIL: blk_in
> 
> ^^^ no more output
> 
> freddy77
> _______________________________________________
> FreeTDS mailing list
> FreeTDS at lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds

==============================================================================

If you are not an intended recipient of this e-mail, please notify
the sender, delete it and do not read, act upon, print, disclose,
copy, retain or redistribute it.

Click here for important additional terms relating to this e-mail.
     <http://www.ml.com/email_terms/>

==============================================================================




More information about the FreeTDS mailing list