[Groonga-commit] groonga/groonga at 4ab718b [master] clang: suppress a warning

Back to archive index

Kouhei Sutou null+****@clear*****
Tue Jun 11 13:42:10 JST 2013


Kouhei Sutou	2013-06-11 13:42:10 +0900 (Tue, 11 Jun 2013)

  New Revision: 4ab718beb8586af141450e74d9ec50f6be93bed2
  https://github.com/groonga/groonga/commit/4ab718beb8586af141450e74d9ec50f6be93bed2

  Message:
    clang: suppress a warning
    
        lib/expr.c:437:37: warning: passing
              'const uint8_t *' (aka 'const unsigned char *') to parameter of type
              'const char *' converts between pointers to integer types with different
              sign [-Wpointer-sign]
            v = grn_expr_add_var(ctx, expr, ns ? p : NULL, ns);
                                            ^~~~~~~~~~~~~

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+1 -1)
===================================================================
--- lib/expr.c    2013-06-11 13:41:22 +0900 (1d29b88)
+++ lib/expr.c    2013-06-11 13:42:10 +0900 (17f8aae)
@@ -434,7 +434,7 @@ grn_expr_unpack(grn_ctx *ctx, const uint8_t *p, const uint8_t *pe, grn_obj *expr
   GRN_B_DEC(n, p);
   for (i = 0; i < n; i++) {
     GRN_B_DEC(ns, p);
-    v = grn_expr_add_var(ctx, expr, ns ? p : NULL, ns);
+    v = grn_expr_add_var(ctx, expr, ns ? (const char *)p : NULL, ns);
     p += ns;
     GRN_B_DEC(type, p);
     if (GRN_TYPE <= type && type <= GRN_COLUMN_INDEX) { /* error */ }
-------------- next part --------------
HTML����������������������������...
Download 



More information about the Groonga-commit mailing list
Back to archive index