[splint-discuss] Char and Int

Isabelle, Francois Francois.Isabelle at ca.kontron.com
Fri Sep 28 08:55:12 EDT 2007


use an explicit cast  ((unsigned char)10)
use a macro #define MIN_DUR ((unsigned char)10)  , MinDur = MIN_DUR
 

Francois Isabelle
Francois.Isabelle at ca.kontron.com
Concepteur de logiciel
Software designer
Kontron Canada

L'information contenue dans le présent document est la propriété de Kontron Canada inc. et est divulguée en toute confidentialité. Cette information ne doit pas être utilisée, divulguée à d'autres personnes ou reproduite sans le consentement écrit explicite de Kontron Canada inc.

The information contained in this document is confidential and the sole property of Kontron Canada Inc. It shall not be used, disclosed to others or reproduced without the express written consent of Kontron Canada Inc.



-----Original Message-----
From: splint-discuss-bounces at cs.virginia.edu [mailto:splint-discuss-bounces at cs.virginia.edu]On Behalf Of Putten van der Bob
Sent: 28 septembre, 2007 08:30
To: Splint group (splint-discuss at mail.cs.virginia.edu)
Subject: [splint-discuss] Char and Int



I wrote the following code:

Unsigned char MiniMalInsDuration = 10;

 

Now SPLint say's:
Variable MiniMalInsDuration initialized to type int, expects   unsigned char: 10

 

How can I tell SPLint that '10' should be handled as a unsigned char?

 

(Is there some way to easily brows or search The splint-discuss Archives )

 

With kind regards / Mit freundlichen Grüssen 
B.F.A. van der Putten 
Engineer D&D 
KONE Deursystemen BV
Accustraat 21
3903 LX  Veenendaal
Postbus 94
3900 AB  Veenendaal
* Phone:     +31 (0) 318 532 333
* Fax:         +31 (0) 318 532 339
* Email:      bob.van.der.putten at kone.com
* Website:   www.kone.com <http://www.kone.com/> 

 

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.cs.virginia.edu/pipermail/splint-discuss/attachments/20070928/9488c4df/attachment-0001.html 


More information about the splint-discuss mailing list