Skip to content
Commit cfd5c9b4 authored by Kumar Gala's avatar Kumar Gala Committed by Kumar Gala
Browse files

samples: nats: Fix warning when building with newlib



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)])

Explicity cast to unsigned char so we deal with both this warning and
possible warning when -Wpointer-sign is enabled.

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