warning: comparison between signed and unsigned integer expressions

SD <macosxdevlist-LS+HbC+WUqxt2bImrQXijVaTQe2KTcn/@public.gmane.org>
Newsgroups gmane.comp.macosx.devel
Message-ID <p062408ccc7f277c720df@[172.16.32.166]>
How do people normally handle the comparison between signed and 
unsigned integers?  I have cross platform code (Mac and Windows and 
32 bit and 64 bit compilations). 

How do people normally get rid of the compiler warning for this code:


off_t fileLength = ...;
size_t bytesRead = ...;

if(bytesRead != fileLength)  //this line gives
   //warning: comparison between signed and unsigned integer expressions
{
}

Currently I just ignore it, but it's annoying and sloppy.

Thanx again all.
SD

-- 
==========================================
SD

WARNING: Programming may be habit forming.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.