cURL / Mailing Lists / curl-library / Single Mail

curl-library

RE: Array Index size_t vs int

From: Joe Mason <jmason_at_rim.com>
Date: Mon, 17 Sep 2012 19:16:49 +0000

> From: curl-library [curl-library-bounces_at_cool.haxx.se] on behalf of Marc
> Hoersken [info_at_marc-hoersken.de]
 
> This means that using size_t/ssize_t instead of int would remove the
> actual warning and it would make sure that the value is actually big
> enough to hold the array length or index on a 64bit system. I know,
> it's unlikely that most of the arrays ever grow that large, but that
> way we would be safe regarding this.
>
> What do you think about this? Is this a good alternative to the
> existing strategy that should/could be used to remove the remaining
> warnings and may also be used to replace the existing type
> conversions?

Yes, absolutely. The bsat way to avoid type conversion warnings is to use the same types throughout!

Joe
---------------------------------------------------------------------
This transmission (including any attachments) may contain confidential information, privileged material (including material protected by the solicitor-client or other applicable privileges), or constitute non-public information. Any use of this information by anyone other than the intended recipient is prohibited. If you have received this transmission in error, please immediately reply to the sender and delete this information from your system. Use, dissemination, distribution, or reproduction of this transmission by unintended recipients is not authorized and may be unlawful.

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-09-17