Skip to Content.
Sympa Menu

freetds - RE: [freetds] warnings and oddities

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Marquess, Dustin" <Dustin.Marquess AT allegiancetelecom.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] warnings and oddities
  • Date: Mon, 8 Dec 2003 16:52:54 -0600

> replacements/iconv.c:200: warning: cast from pointer to
> integer of different
> size
>
> That line is:
>
> if ((int)cd == UCS2LE_ASCII && !isascii(**inbuf)) {
>
> We know perfectly well that "cd", while declared an iconv_t,
> contains an
> enumerated value, an int. So we *cast* it, and still the
> warning? What
> warning-proof syntax can we use?

I don't think this is because of cd, I think it's because of inbuf. iconv()
declares inbuf like:

const char* * inbuf

On my Tru64 v5.1B box:

jailbird@bobdole:/usr/include$ grep 'isascii' `find . -type f -print`
./ctype.h:extern int isascii __((int));
./ctype.h:#define isascii(c) (!((int)(c) & ~0177))

So I think it's complaining that you're calling isascii() on a const char
value? Although I would think that the (int) in the define would take of
that, so I could be wrong...

-Dustin




Archive powered by MHonArc 2.6.24.

Top of Page