Alan Pinstein writes:
> I've got a C question...

So go ask a C newsgroup -- I recommend comp.lang.c.moderated.  Better yet,
why not read their FAQ?

        http://www.eskimo.com/~scs/C-faq/s11.html

> dbErrType DBGetCellPtr_RO(DBOpenDBInfoType* gdb, char* colName, ULong 
> row, ULong* dataSize, const void** dataP);
[...]
> byte* dataP;
> dbErr = DBGetCellPtr_RO(gdb, "name", 0, &dataSize, (void**) &dataP);
>
> Problem is, that the compiler lets me do this!

Actually, a *good* compiler won't let you do this.  See q11.10 at the
URL above.  (But to get this to work, you'd have to get your types right
and not wimp out by using void pointers.  You might have better luck having
your function return a `const void *'.)

(Greg's response solves a different problem.  You had the declaration right
for what you were trying to do, it's just that CodeWarrior is too brain-dead
to detect the problem.  Get a real compiler!  (Yes, GCC for PalmOS will warn
you in this circumstance.))

    John  "appropriate fora -- better answers faster"

Reply via email to