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

Back to archive index

null+****@clear***** null+****@clear*****
Fri Aug 10 18:21:22 JST 2012


Kouhei Sutou	2012-08-10 18:21:22 +0900 (Fri, 10 Aug 2012)

  New Revision: 07c6de0855a0b7674a36b99ea4687ae9b72bfce5
  https://github.com/groonga/groonga/commit/07c6de0855a0b7674a36b99ea4687ae9b72bfce5

  Log:
    clang: suppress a warning
    
    proc.c:2238:13: warning: implicit conversion from enumeration type
          'grn_log_level' to different enumeration type 'grn_rc' [-Wconversion]
            ERR(GRN_ERROR, "invalid header type %d", column->header.type);
            ~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    ./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 (+3 -1)
===================================================================
--- lib/proc.c    2012-08-10 18:20:40 +0900 (fae424d)
+++ lib/proc.c    2012-08-10 18:21:22 +0900 (a7a95f5)
@@ -2237,7 +2237,9 @@ dump_records(grn_ctx *ctx, grn_obj *outbuf, grn_obj *table)
         }
         break;
       default:
-        ERR(GRN_ERROR, "invalid header type %d", column->header.type);
+        ERR(GRN_OPERATION_NOT_SUPPORTED,
+            "unsupported header type %#x",
+            column->header.type);
         break;
       }
     }
-------------- next part --------------
HTML����������������������������...
Download 



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