-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On 02/25/07 14:33, Frank B. Brokken wrote: > Dear Steve Langasek, you wrote: > >>> The intention here is to use size_t in situations where the value is known >>> to be non-negative. >> I don't see any reason why you should use size_t for that instead of >> unsigned int. size_t is intended for use in describing the size of objects >> in memory, not just for anything you know should be non-negative. > > Hm, well, your observation is interesting, but I'm not convinced: > > https://www.securecoding.cert.org/confluence/display/seccode/INT01-A.+Use+size_t+for+all+integer+values+representing+the+size+of+an+object > >>From this: > > Any variable that is used to represent the size of an object including, > but not limited to, integer values used as sizes, indices, loop counters, > and lengths should be declared as size_t
size_t nargs; if (parser_number_parlist(&parser, (int *)&nargs, true) == SUCCESS) It's been a while since I coded in C, so take this for worth, but what if you do this s/(int *)/(size_t *) -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.6 (GNU/Linux) iD8DBQFF4f+jS9HxQb37XmcRArZLAKDM9VxJG4ILqyIINvNP+3GVF6fCAwCeIDvf uzKiE/8NtzfxIY8zdosangY= =Cw1p -----END PGP SIGNATURE----- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]