[Groonga-mysql-commit] mroonga/mroonga at 6314c5f [master] Suppress a warning for print format type

Back to archive index

Kouhei Sutou null+****@clear*****
Sat Mar 21 22:24:19 JST 2015


Kouhei Sutou	2015-03-21 22:24:19 +0900 (Sat, 21 Mar 2015)

  New Revision: 6314c5f2a0f5e38c5c8691c7c21cadbaeda90cef
  https://github.com/mroonga/mroonga/commit/6314c5f2a0f5e38c5c8691c7c21cadbaeda90cef

  Message:
    Suppress a warning for print format type

  Modified files:
    ha_mroonga.cpp
    mrn_mysql_compat.h

  Modified: ha_mroonga.cpp (+2 -1)
===================================================================
--- ha_mroonga.cpp    2015-03-19 18:50:51 +0900 (5cc9c22)
+++ ha_mroonga.cpp    2015-03-21 22:24:19 +0900 (7feaba7)
@@ -9521,7 +9521,8 @@ int ha_mroonga::generic_store_bulk_variable_size_string(Field *field,
   String value;
   field->val_str(NULL, &value);
   grn_obj_reinit(ctx, buf, GRN_DB_SHORT_TEXT, 0);
-  DBUG_PRINT("info", ("mroonga: length=%zu", value.length()));
+  DBUG_PRINT("info", ("mroonga: length=%" MRN_FORMAT_STRING_LENGTH,
+                      value.length()));
   DBUG_PRINT("info", ("mroonga: value=%s", value.c_ptr_safe()));
   GRN_TEXT_SET(ctx, buf, value.ptr(), value.length());
   DBUG_RETURN(error);

  Modified: mrn_mysql_compat.h (+6 -0)
===================================================================
--- mrn_mysql_compat.h    2015-03-19 18:50:51 +0900 (83eaf69)
+++ mrn_mysql_compat.h    2015-03-21 22:24:19 +0900 (f2c6bc5)
@@ -216,4 +216,10 @@
 #  define MRN_HAVE_SPATIAL
 #endif
 
+#if MYSQL_VERSION_ID >= 50706 && !defined(MRN_MARIADB_P)
+#  define MRN_FORMAT_STRING_LENGTH "u"
+#else
+#  define MRN_FORMAT_STRING_LENGTH "zu"
+#endif
+
 #endif /* MRN_MYSQL_COMPAT_H_ */
-------------- next part --------------
HTML����������������������������...
下载 



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