Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!snorkelwacker.mit.edu!bloom-beacon!eru!hagbard!sunic!mcsun!unido!rwthinf!rwthbs!hls From: hls@rwthbs.uucp (H.L. Stahl) Newsgroups: comp.lang.c Subject: Re: unsigned/signed mismatch in MSC 6.0 Message-ID: <1990Nov26.070420.24813@rwthbs.uucp> Date: 26 Nov 90 07:04:20 GMT References: <2301@sparko.gwu.edu> Reply-To: hls@rwthbs.UUCP Organization: Lehrstuhl fuer Betriebssysteme, RWTH Aachen Lines: 19 In article <2301@sparko.gwu.edu> timur@seas.gwu.edu () writes: >I'm using Microsoft C 6.0, and I have my warnings set to level 4. I'm >getting an error with this expression: > >strlen(s) > ... In MS-C (and ANSI C ?) the return type of "strlen" is defined as "size_t", which is defined as "unsigned int" in MS-C. But strlen(s) < (size_t)(WIDTH) should work ... | _ : Hans-Ludwig Stahl, Lehrstuhl fuer Betriebssysteme, RWTH Aachen |_|_`__ : Kopernikusstr. 16, D-5100 Aachen, ..49-(0)241-804374 | |__) : Domain: hls@informatik.rwth-aachen.de |__) : uucp: ...!{seismo,mcvax,uunet}!unido!rwthinf!hls