[splint-discuss] splint doesn't like unsigned long long?

Jeff Johnson n3npq at mac.com
Sat Nov 13 09:17:03 PST 2010


On Nov 13, 2010, at 9:31 AM, Greg White wrote:

> > On 11/11/2010, at 2:37 PM, Greg wrote:
> > > I ran splint on my program and received the following results:
> > ...
> > > 
> > > Did I do something wrong?
> > 
> > You used a C89 checker. %lld is not legal C89.
> 
> What is the C89 equivalent?  Unsigned long isn't large enough and I don't need any decimal places.  Can float handle large numbers without decimal places?  If there is no long long C89 equivalent then How do I test for C99 compliance?
> 

There is a simple and expedient hack that can be done too.

Instead of using "%lld" one can use "%ld" and add a cast to the
long long integer. That will remove the warning does get on to
more interesting flaws that splint can find in all C code.

Please note "expedient hack".

73 de Jeff

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20101113/4f898f3c/attachment.html 


More information about the splint-discuss mailing list