This is the mail archive of the
newlib@sourceware.org
mailing list for the newlib project.
warnings from use of ctype.h methods
- From: Joel Sherrill <joel dot sherrill at oarcorp dot com>
- To: "newlib at sources dot redhat dot com" <newlib at sources dot redhat dot com>
- Date: Thu, 11 Mar 2010 10:16:46 -0600
- Subject: warnings from use of ctype.h methods
Hi,
I was looking over the warnings and noticed
a number of these in our build logs (~60
per build):
warning: array subscript has type 'char'
Most, if not all, of these appear to be from
using ctype.h methods which is caused by
a missing (int) case in line 57 in ctype.h:
#define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[(__c]))[(int)(__c)])
Changing this to the following resolved the
warnings.
#define __ctype_lookup(__c)
((__ctype_ptr__+sizeof(""[(int)__c]))[(int)(__c)])
This is with newlib 1.18.0 with the current RTEMS
patch.
Does this cast need to be added?
--
Joel Sherrill, Ph.D. Director of Research& Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985