diff options
| author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-01-30 12:27:45 +0900 |
|---|---|---|
| committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2025-01-30 16:56:02 +0900 |
| commit | dc3d2a3c2ff20c40b715dd18e1ab52a4b8a7619d (patch) | |
| tree | 52808fd1bd3f0b13ffed5032ade410cd09511434 /include | |
| parent | 7f70ef64aff9b22b080690cdf9a725a2acb70f17 (diff) | |
[ruby/json] Avoid plain char for ctype macros
On some platforms ctype functions are defined as macros accesing tables.
A plain char may be `signed` or `unsigned` per implementations and the
extension result implementation dependent.
gcc warns such case:
```
parser.c: In function 'rstring_cache_fetch':
parser.c:138:33: warning: array subscript has type 'char' [-Wchar-subscripts]
138 | if (RB_UNLIKELY(!isalpha(str[0]))) {
| ~~~^~~
parser.c: In function 'rsymbol_cache_fetch':
parser.c:190:33: warning: array subscript has type 'char' [-Wchar-subscripts]
190 | if (RB_UNLIKELY(!isalpha(str[0]))) {
| ~~~^~~
```
https://github.com/ruby/json/commit/4431b362f6
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
