Skip to content

GCC 5.3.1 Compiler warning: sign compare #14

@yida29

Description

@yida29

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) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions