Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
GCC 7.1.1 produces these warnings:
gcc -c -D_REENTRANT -D_GNU_SOURCE -O2 -g -pipe -Wall -Werror=format-security -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector-strong --param=ssp-buffer-size=4 -grecord-gcc-switches -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -m64 -mtune=generic -fwrapv -fno-strict-aliasing -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -g -DVERSION="0.14" -DXS_VERSION="0.14" -fPIC "-I/usr/lib64/perl5/CORE" C.c
C.xs: In function ‘XS_Env__C_getallenv’:
C.xs:162:30: warning: comparison between pointer and zero character constant [-Wpointer-compare]
while ((char*)environ[i] != '\0') {
^~
C.xs:162:12: note: did you mean to dereference the pointer?
while ((char*)environ[i] != '\0') {
^
C.xs:154:9: warning: unused variable ‘av’ [-Wunused-variable]
AV *av = Nullav;
^~
C.xs:153:11: warning: unused variable ‘p’ [-Wunused-variable]
char *p;
^
This patch fixes it.