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

Back to archive index

null+****@clear***** null+****@clear*****
Fri Aug 10 18:17:19 JST 2012


Kouhei Sutou	2012-08-10 18:17:19 +0900 (Fri, 10 Aug 2012)

  New Revision: 63032b1cad7bc67d47622b8be4e46bb7c057d825
  https://github.com/groonga/groonga/commit/63032b1cad7bc67d47622b8be4e46bb7c057d825

  Log:
    clang: suppress a warning
    
    proc.c:2070:11: warning: implicit conversion from enumeration type
          'grn_log_level' to different enumeration type 'grn_rc' [-Wconversion]
          ERR(GRN_ERROR, "corrupted view table");
          ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./ctx.h:78:21: note: expanded from macro 'GRN_ERROR'
    #define  GRN_ERROR  GRN_LOG_ERROR
                        ^
    ./ctx.h:144:45: note: expanded from macro 'ERR'
    #define ERR(rc,...) ERRSET(ctx, GRN_ERROR, (rc),  __VA_ARGS__)
                                                ^
    ./ctx.h:118:15: note: expanded from macro 'ERRSET'
      ctx_->rc = (r);\
               ~  ^

  Modified files:
    lib/proc.c

  Modified: lib/proc.c (+1 -1)
===================================================================
--- lib/proc.c    2012-08-10 18:16:44 +0900 (c8954f2)
+++ lib/proc.c    2012-08-10 18:17:19 +0900 (d8582a2)
@@ -2067,7 +2067,7 @@ dump_view(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
     grn_id *table_id;
     int key_size = grn_hash_cursor_get_key(ctx, cursor, ((void **)&table_id));
     if (key_size != 4) {
-      ERR(GRN_ERROR, "corrupted view table");
+      ERR(GRN_INVALID_ARGUMENT, "corrupted view table");
     }
     GRN_TEXT_PUTS(ctx, outbuf, "view_add ");
     dump_obj_name(ctx, outbuf, table);
-------------- next part --------------
HTML����������������������������...
Download 



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