Navigation Menu

Skip to content

Commit

Permalink
Suppress a warning
Browse files Browse the repository at this point in the history
    operator.c:118:3: warning: comparison of unsigned expression >= 0 is always true [-Wtype-limits]
  • Loading branch information
kou committed Apr 18, 2015
1 parent 083b4f5 commit 1b8e14d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/operator.c
Expand Up @@ -112,10 +112,12 @@ static const char *operator_names[] = {
"regexp"
};

#define GRN_OP_LAST GRN_OP_REGEXP

const char *
grn_operator_to_string(grn_operator op)
{
if (GRN_OP_PUSH <= op && op <= GRN_OP_REGEXP) {
if (op <= GRN_OP_LAST) {
return operator_names[op];
} else {
return "unknown";
Expand Down

0 comments on commit 1b8e14d

Please sign in to comment.