Skip to content
Commit 21309ea4 authored by Kumar Gala's avatar Kumar Gala Committed by Anas Nashif
Browse files

lib: json: use explicit unsigned char to avoid array subscript error



If we use newlib the isdigit (and other similar functions) return an
error as char can possibly be viewed as signed:

usr/include/ctype.h:57:54: error: array subscript has type ‘char’ [-Werror=char-subscripts]
 #define __ctype_lookup(__c) ((__ctype_ptr__+sizeof(""[__c]))[(int)(__c)])

Being explicit about the char being unsigned char deals with this.

Change-Id: If2416218220ef5b29f1a69470cbcc6b4fd49ef86
Signed-off-by: default avatarKumar Gala <kumar.gala@linaro.org>
parent 4c80a2fb
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment