-
Notifications
You must be signed in to change notification settings - Fork 1k
Closed
Description
Line 159 in a599557
| valP[k++] = STRING_PTR_RO(item); |
Line 43 in a599557
| xd = STRING_PTR_RO(PROTECT(coerceUtf8IfNeeded(x))); nprotect++; |
The compiler (on GitHub codespaces) warns at these two places:
chmatch.c: In function ‘chmatchMain’:
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include -fpic -fopenmp -std=c11 -O3 -pipe -Wall -pedantic -Wstrict-prototypes -isystem /usr/share/R/include -fno-common -c subset.c -o subset.o
coalesce.c: In function ‘coalesce’:
chmatch.c:43:8: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
43 | xd = STRING_PTR_RO(PROTECT(coerceUtf8IfNeeded(x))); nprotect++;
| ^
gcc -I"/usr/local/lib/R/include" -DNDEBUG -I/usr/local/include -fpic -fopenmp -std=c11 -O3 -pipe -Wall -pedantic -Wstrict-prototypes -isystem /usr/share/R/include -fno-common -c transpose.c -o transpose.o
coalesce.c:159:17: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers]
159 | valP[k++] = STRING_PTR_RO(item);
| ^
The chmatch.c one is easy to fix (by instantiating xd as const), I'm less clear on how to fix the coalesce issue.