www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/11/22:04:19

From: firewind <firewind AT metroid DOT dyn DOT ml DOT org>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Warnings in DJGPP
Date: 12 Sep 1997 00:50:34 GMT
Organization: Netcom
Lines: 20
Message-ID: <5va3kq$qeb@dfw-ixnews3.ix.netcom.com>
References: <01bcbee0$b69fa9c0$30f582c1 AT nicland>
NNTP-Posting-Host: elp-tx2-09.ix.netcom.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Nicholas Law <nic DOT law AT dial DOT pipex DOT com> wrote:

> Hi all!

> I'm making a 3D engine in DJGPP 2.01 and RHIDE and use a lot of conversions
> from float to int types using simple assignment (a=b).

> I keep getting irritating warnings telling me about these type conversions.
> I've tried -Wconversion and -Wenum-clash to turn the warnings off but the
> was no effect.

A simple cast should fix it. For example, 

a = (float)b;
b = (int)a;

-- 
[- 				 firewind	                            -]
[-   email: firewind AT metroid DOT dyn DOT ml DOT org (home), firewind AT aurdev DOT com (work)  -]
[- 	    "You're just jealous because the voices talk to -me-."          -]

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019