home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!b63519.STUDENT.CWRU.Edu!dpn2
- From: dpn2@po.CWRU.Edu (Damien P. Neil)
- Newsgroups: comp.os.msdos.programmer
- Subject: Re: BC++ 3.1 bug?
- Date: Sat, 21 Nov 1992 06:31:16 GMT
- Organization: Case Western Reserve University
- Lines: 32
- Message-ID: <dpn2.133.722327476@po.CWRU.Edu>
- References: <1992Nov20.174122.2729@microware.com>
- NNTP-Posting-Host: b63519.student.cwru.edu
-
- In article <1992Nov20.174122.2729@microware.com> adam@microware.com (Adam Goldberg) writes:
- >The following produces an interesting error:
- >
- >#include <dos.h>
- >#include <mem.h>
- >
- >void main(void)
- >{
- > unsigned short far *ppm, *dest;
- >
- > if(NULL == (ppm = (unsigned short far *)farmalloc(1024)))
- > {
- > error message...
- > }
- >
- > if(NULL == (dest = (unsigned short far *)farmalloc(1024)))
- > {
- > error message...
- > }
- >
- >
- >This produces an error on the _second_ farmalloc(), "suspicious
- >pointer conversion". (not on the first...)
-
- Try: unsigned short far *ppm, far *dest;
-
- You need to specifically declare each pointer far.
-
- BTW -- a minor nit: main() should be declared as returning an int...
- Damien Neil dpn2@po.cwru.edu "Until somebody debugs reality, the best
- CMPS/EEAP double majoring masochist I can do is a quick patch here and there."
- Case Western Reserve University - Erik Green
-