Re: [hatari-devel] Warnings |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
- To: hatari-devel@xxxxxxxxxxxxxxxxxxx
- Subject: Re: [hatari-devel] Warnings
- From: Vincent Rivière <vincent.riviere@xxxxxxxxxxx>
- Date: Sat, 3 Oct 2020 14:34:35 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:subject:to:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=ePjcpZXW4n7tjkrxgvwIY0YxqioiVyKv+G2eVj8B67k=; b=tpO4FjCRQoceiL3dcn7SkTxzu8UDchB8Ucv1JxBpK/DuuRSsZKUprWbbNXwSvhpOWA 13fgaHxUiCazFwlOnk64akkzTXl4v0UsUGJic7VevxyXiF/NX+5ji09YXXpbFNjRZ2Xy jIxRoab87743AWCUShEAGI8mk+cv4xTC5pmPEuDQ2wgcMJAGSI3eMlnnlgutesSl7GJ4 3+p2xyYnGPY6Zm+mqhllutI477cd7nh/d5LGELeAzmW5T8JUh7KoiP5HSjo0CM0GBbnV IRbt6rtXpguNpyGAbBIPgEToAkub8xNUdi3Fwmqy9gYtM62DJaJzgWd8qeorx/LFQQIv QKiA==
On 03/10/2020 at 14:22, Thorsten Otto wrote:
On Samstag, 3. Oktober 2020 13:32:17 CEST Vincent Rivière wrote:
> if (isprint((unsigned int)c)) ...
If char is signed, that will still sign-extend the value, so the correct
usage would be if (isprint((unsigned char)c)) ... but only if c is actually
a char, not an int value that could also be EOF.
Apologies, you're right.
This is what I had in mind (I used it several times), but I wrote it from
the top of my head, and fatally this was wrong.
Thanks for your vigilance.
--
Vincent Rivière