Date: Wed, 10 Dec 1997 17:18:26 -0800 (PST) Message-Id: <199712110118.RAA12583@adit.ap.net> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" To: radon AT swipnet DOT se (Rikard =?iso-8859-1?Q?Bj=F6rklind?= ), djgpp AT delorie DOT com From: Nate Eldredge Subject: Re: Strange warning messageq Content-Transfer-Encoding: 8bit Precedence: bulk At 06:56 12/10/1997 GMT, Rikard Björklind wrote: >Tony O'Bryan wrote: > >>Not without seeing the exact error. The fragment you provided might be >>part of the warning given when the programmer tries to assign a pointer >>to an integer. > >Okay, here it is: >warning: assignment makes pointer from integer without a cast >and here is the code: >--- >#include > >char *screen; > >main() { >asm ("movw $0x0013,%ax"); >asm ("int $0x10"); > >if (__djgpp_nearptr_enable() == 0) return 1; >screen = 0xa0000 + __djgpp_conventional_base; You do indeed make a pointer from an integer without a cast. 0xa0000 is an integer, `__djgpp_conventional_base' is an integer, and `screen' is a pointer. Easy to fix, though; use a cast. screen = (char *) 0xa0000 + __djgpp_conventional_base; Nate Eldredge eldredge AT ap DOT net