Skip to Content.
Sympa Menu

freetds - Re: const

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: TDS Development Group <freetds AT franklin.oit.unc.edu>
  • Subject: Re: const
  • Date: 05 Nov 2002 08:55:22 +0100


Il lun, 2002-11-04 alle 22:57, Castellano, Nicholas ha scritto:
> Good...glad you agree. Hopefully nobody else will object and I can go ahead
> with this soon.
>
> By the way, your change to dblib.c is not really appropriate. It does not
> really correct these warnings, it just hides them a little bit better. If
> you use "-Wcast-qual" you will still receive a warning. The correct fix is
> to go ahead with my suggestion and add "const" in the appropriate places in
> the public interfaces, so that these items are passed consistently between
> all functions as const.
>
> Cheers,
> --nick
>

Yes, but so you not resolve problem but you shift to client. Client
expect a char* so probably it implicitly convert const char* to char*...
This is not a problem on C (you have a warning) but in C++ this is an
error (I know is simple to fix)...

At the end I'm with you, dblib declarations are old, adding a const in
return is good.

freddy77





  • const, Castellano, Nicholas, 11/04/2002
    • <Possible follow-up(s)>
    • Re: const, Frediano Ziglio, 11/04/2002
    • Re: const, Castellano, Nicholas, 11/04/2002
    • Re: const, Frediano Ziglio, 11/05/2002

Archive powered by MHonArc 2.6.24.

Top of Page