Hm...
MemHandleLock returns VoidPtr.
I assume that RecPointer is CharPtr, so you should explicitly cast the
result:
RecPointer = (CharPtr)MemHandleLock(RecHandle);
name[i] = RecPointer[i+offset];
if(RecPointer[i+2] == '\n') {
If I do remember that correctly, void pointers cannot be casted
implicitly to non-void in C, whereas vice versa is allowed.
Mike Davis schrieb:
> I have a problem that I am not sure how to fix. I get an error on a
> piece of code, using SDK 3.5, that does not show up when using SDK
> 3.0.
>
> The error:
> "Warning: dereferencing 'void *' pointer
> void value not ignored as it ought to be"
>
> The code that produces this is:
>
> RecPointer = MemHandleLock(RecHandle);
> name[i] = RecPointer[i+offset];
> if(RecPointer[i+2] == '\n') {
>
> In all locations, where RecPointer is used, I get this error.
> I know what the error suggests but I'm not sure why I am getting it
> only when I use SDK 3.5 and not SDK 3.0.
>
> I have tried to test RecPointer for NULL then return if it is NULL,
> but that did not remove the warning.
>
> What causes it? What is the fix?
>
> Thanks
> --
> -----------------------------------------------------------------
> Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
>
> Protect your constitutional rights. Your favorite one may be next!
> -----------------------------------------------------------------
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/