buffer
buffer copied to clipboard
GCC 5.3.1 Compiler warning: sign compare
compiler
$ gcc --version
gcc (GCC) 5.3.1 20160406 (Red Hat 5.3.1-6)
Copyright (C) 2015 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
result
buffer.c: In function ‘buffer_slice’:
buffer.c:248:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (to < from) return NULL;
^
buffer.c:254:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (to > len) to = len;
^
buffer.c: In function ‘buffer_print’:
buffer.c:347:17: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < len; ++i) {