Skip to content

Commit

Permalink
clang: suppress a warning
Browse files Browse the repository at this point in the history
Use "char *" instead of "byte *" for byte string because we check only
whether any '\0' character exists or not.

    lib/str.c:3263:9: warning: initializing 'byte *'
          (aka 'unsigned char *') with an expression of type 'char *' converts
          between pointers to integer types with different sign [-Wpointer-sign]
      byte *v = GRN_BULK_HEAD(obj);
            ^   ~~~~~~~~~~~~~~~~~~
  • Loading branch information
kou committed Jun 11, 2013
1 parent 6a43228 commit 4b26c30
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/str.c
Expand Up @@ -3260,7 +3260,7 @@ grn_text_fgets(grn_ctx *ctx, grn_obj *buf, FILE *fp)
grn_bool
grn_bulk_is_zero(grn_ctx *ctx, grn_obj *obj)
{
byte *v = GRN_BULK_HEAD(obj);
const char *v = GRN_BULK_HEAD(obj);
unsigned int s = GRN_BULK_VSIZE(obj);
for (; s; s--, v++) {
if (*v) { return GRN_FALSE; }
Expand Down

0 comments on commit 4b26c30

Please sign in to comment.