This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]