Navigation Menu

Skip to content

Commit

Permalink
Suppress a warning for print format type
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Mar 21, 2015
1 parent b9f6956 commit 6314c5f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ha_mroonga.cpp
Expand Up @@ -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);
Expand Down
6 changes: 6 additions & 0 deletions mrn_mysql_compat.h
Expand Up @@ -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_ */

0 comments on commit 6314c5f

Please sign in to comment.