[Groonga-commit] groonga/groonga [master] Suppress a warning

Back to archive index

null+****@clear***** null+****@clear*****
2012年 6月 7日 (木) 22:51:48 JST


Kouhei Sutou	2012-06-07 22:51:48 +0900 (Thu, 07 Jun 2012)

  New Revision: 93f50167016f3aa6604556174f3ed034e89b83b1

  Log:
    Suppress a warning
    
    warning: format '%ld' expects argument of type 'long int', but argument 8 has type 'int' [-Wformat]
    
    Use %zu instead of %ld for size_t.

  Modified files:
    lib/expr.c

  Modified: lib/expr.c (+1 -1)
===================================================================
--- lib/expr.c    2012-06-07 22:47:55 +0900 (fed1063)
+++ lib/expr.c    2012-06-07 22:51:48 +0900 (ee97a01)
@@ -2140,7 +2140,7 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
   }                                                                     \
   if (GRN_BULK_VSIZE(var) != (sizeof(grn_obj *) + sizeof(grn_id))) {    \
     ERR(GRN_INVALID_ARGUMENT,                                           \
-        "invalid variable size: expected: %ld, actual: %ld",            \
+        "invalid variable size: expected: %zu, actual: %zu",            \
         (sizeof(grn_obj *) + sizeof(grn_id)), GRN_BULK_VSIZE(var));     \
     goto exit;                                                          \
   }                                                                     \




Groonga-commit メーリングリストの案内
Back to archive index