Here's a bit more context showing the variable being referenced
(for simplicity, GCC takes singleton objects as arrays of one
element):
In file included from fnmatch.c:244:
In function ‘findidxwc’,
inlined from ‘internal_fnwmatch’ at fnmatch_loop.c:404:10:
../locale/weightwc.h:124:28: error: array subscript 1 is outside array
bounds of ‘wint_t[1]’ {aka ‘unsigned int[1]’} [-Werror=array-bounds]
if (cp[nhere - 1] > usrc[nhere -1])
~~~~^~~~~~~~~~
In file included from fnmatch.c:315:
fnmatch_loop.c: In function ‘internal_fnwmatch’:
fnmatch_loop.c:342:13: note: while referencing ‘str’
UCHAR str;
^~~