null+****@clear*****
null+****@clear*****
2012年 5月 1日 (火) 12:01:25 JST
Susumu Yata 2012-05-01 12:01:25 +0900 (Tue, 01 May 2012)
New Revision: 646774988a5d670dc67f758766a2c982a3d28760
Log:
Fix format strings and their arguments.
Modified files:
lib/db.c
lib/ecmascript.c
lib/ecmascript.y
lib/expr.c
lib/ii.c
lib/io.c
Modified: lib/db.c (+11 -11)
===================================================================
--- lib/db.c 2012-05-01 11:33:51 +0900 (1d319e2)
+++ lib/db.c 2012-05-01 12:01:25 +0900 (91d4ca4)
@@ -61,7 +61,7 @@
ERR(GRN_INVALID_ARGUMENT, "<%.*s>: failed to cast to <%.*s>: <%.*s>",\
column_name_size, column_name,\
range_name_size, range_name,\
- GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected));\
+ (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected));\
GRN_OBJ_FIN(ctx, &inspected);\
} while (0)
@@ -6015,7 +6015,7 @@ grn_obj_set_info(grn_ctx *ctx, grn_obj *obj, grn_info_type type, grn_obj *value)
if (vs) { GRN_TEXT_PUTC(ctx, &buf, ','); }
}
GRN_LOG(ctx, GRN_LOG_NOTICE, "DDL:set_source %.*s",
- GRN_BULK_VSIZE(&buf), GRN_BULK_HEAD(&buf));
+ (int)GRN_BULK_VSIZE(&buf), GRN_BULK_HEAD(&buf));
GRN_OBJ_FIN(ctx, &buf);
}
{
@@ -8341,7 +8341,7 @@ grn_table_sort_key_from_str_geo(grn_ctx *ctx, const char *str, unsigned int str_
if (k == keys) {
if (!(k->key = grn_obj_column(ctx, table, p, r - p))) {
WARN(GRN_INVALID_ARGUMENT, "invalid sort key: <%.*s>(<%.*s>)",
- tokbuf[i] - p, p, str_size, str);
+ (int)(tokbuf[i] - p), p, str_size, str);
break;
}
domain = grn_obj_get_range(ctx, k->key);
@@ -8403,11 +8403,11 @@ grn_table_sort_key_from_str(grn_ctx *ctx, const char *str, unsigned int str_size
if (r - p == 6 && memcmp(p, "_score", 6) == 0) {
GRN_LOG(ctx, GRN_WARN,
"ignore invalid sort key: <%.*s>(<%.*s>)",
- r - p, p, str_size, str);
+ (int)(r - p), p, str_size, str);
} else {
WARN(GRN_INVALID_ARGUMENT,
"invalid sort key: <%.*s>(<%.*s>)",
- r - p, p, str_size, str);
+ (int)(r - p), p, str_size, str);
break;
}
}
@@ -8646,11 +8646,11 @@ report_set_column_value_failure(grn_ctx *ctx,
"[table][load] failed to set column value: %s: "
"key: <%.*s>, column: <%.*s>, value: <%.*s>",
ctx->errbuf,
- GRN_TEXT_LEN(&key_inspected),
+ (int)GRN_TEXT_LEN(&key_inspected),
GRN_TEXT_VALUE(&key_inspected),
column_name_size,
column_name,
- GRN_TEXT_LEN(&column_value_inspected),
+ (int)GRN_TEXT_LEN(&column_value_inspected),
GRN_TEXT_VALUE(&column_value_inspected));
GRN_OBJ_FIN(ctx, &key_inspected);
GRN_OBJ_FIN(ctx, &column_value_inspected);
@@ -8692,7 +8692,7 @@ bracket_close(grn_ctx *ctx, grn_loader *loader)
if (loader->key_offset != -1) {
GRN_LOG(ctx, GRN_LOG_ERROR,
"duplicated key columns: <%.*s> at %d and <%.*s> at %i",
- GRN_TEXT_LEN(key_column_name),
+ (int)GRN_TEXT_LEN(key_column_name),
GRN_TEXT_VALUE(key_column_name),
loader->key_offset,
column_name_size, column_name, i);
@@ -8741,7 +8741,7 @@ bracket_close(grn_ctx *ctx, grn_loader *loader)
grn_inspect(ctx, &buffer, value);
ERR(GRN_INVALID_ARGUMENT,
"column name must be string: <%.*s>",
- GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer));
+ (int)GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer));
GRN_OBJ_FIN(ctx, &buffer);
return;
}
@@ -8826,7 +8826,7 @@ brace_close(grn_ctx *ctx, grn_loader *loader)
name_equal(column_name, column_name_size, ID_NAME))) {
if (key_column_name) {
GRN_LOG(ctx, GRN_LOG_ERROR, "duplicated key columns: %.*s and %.*s",
- GRN_TEXT_LEN(key_column_name),
+ (int)GRN_TEXT_LEN(key_column_name),
GRN_TEXT_VALUE(key_column_name),
column_name_size, column_name);
return;
@@ -9243,7 +9243,7 @@ parse_load_columns(grn_ctx *ctx, grn_obj *table,
while (p < r && (' ' == *p || ',' == *p)) { p++; }
col = grn_obj_column(ctx, table, p, r - p);
if (!col) {
- ERR(GRN_INVALID_ARGUMENT, "nonexistent column: <%.*s>", r - p, p);
+ ERR(GRN_INVALID_ARGUMENT, "nonexistent column: <%.*s>", (int)(r - p), p);
goto exit;
}
GRN_PTR_PUT(ctx, res, col);
Modified: lib/ecmascript.c (+8 -8)
===================================================================
--- lib/ecmascript.c 2012-05-01 11:33:51 +0900 (d7c311d)
+++ lib/ecmascript.c 2012-05-01 12:01:25 +0900 (59be384)
@@ -1605,8 +1605,8 @@ static void yy_reduce(
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be incremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be incremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR, 1);
}
@@ -1626,8 +1626,8 @@ static void yy_reduce(
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be decremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be decremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR, 1);
}
@@ -1703,8 +1703,8 @@ static void yy_reduce(
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be incremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be incremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR_POST, 1);
}
@@ -1724,8 +1724,8 @@ static void yy_reduce(
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be decremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be decremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR_POST, 1);
}
Modified: lib/ecmascript.y (+8 -8)
===================================================================
--- lib/ecmascript.y 2012-05-01 11:33:51 +0900 (2d639b6)
+++ lib/ecmascript.y 2012-05-01 12:01:25 +0900 (3006ae7)
@@ -231,8 +231,8 @@ unary_expression ::= INCR unary_expression. {
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be incremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be incremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR, 1);
}
@@ -248,8 +248,8 @@ unary_expression ::= DECR unary_expression. {
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be decremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be decremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR, 1);
}
@@ -291,8 +291,8 @@ postfix_expression ::= lefthand_side_expression INCR. {
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be incremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be incremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_INCR_POST, 1);
}
@@ -308,8 +308,8 @@ postfix_expression ::= lefthand_side_expression DECR. {
DFI_PUT(e, dfi_->type, dfi_->domain, dfi_->code);
if (const_p) {
ERR(GRN_SYNTAX_ERROR,
- "constant can't be decremented (%*s)",
- efsi->str_end - efsi->str, efsi->str);
+ "constant can't be decremented (%.*s)",
+ (int)(efsi->str_end - efsi->str), efsi->str);
} else {
grn_expr_append_op(efsi->ctx, efsi->e, GRN_OP_DECR_POST, 1);
}
Modified: lib/expr.c (+19 -19)
===================================================================
--- lib/expr.c 2012-05-01 11:33:51 +0900 (eb43802)
+++ lib/expr.c 2012-05-01 12:01:25 +0900 (1065b4c)
@@ -860,7 +860,7 @@ grn_expr_append_obj(grn_ctx *ctx, grn_obj *expr, grn_obj *obj, grn_operator op,
break;
}
ERR(GRN_INVALID_ARGUMENT, "invalid function: <%.*s>",
- GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer));
+ (int)GRN_TEXT_LEN(&buffer), GRN_TEXT_VALUE(&buffer));
GRN_OBJ_FIN(ctx, &buffer);
goto exit;
}
@@ -1910,7 +1910,7 @@ grn_proc_call(grn_ctx *ctx, grn_obj *proc, int nargs, grn_obj *caller)
if (grn_obj_cast(ctx, y, res, GRN_FALSE)) { \
ERR(GRN_INVALID_ARGUMENT, \
"not a numerical format: <%.*s>", \
- GRN_TEXT_LEN(y), GRN_TEXT_VALUE(y)); \
+ (int)GRN_TEXT_LEN(y), GRN_TEXT_VALUE(y)); \
goto exit; \
} \
set(ctx, res, integer_operation(x_, get(res))); \
@@ -2496,7 +2496,7 @@ grn_expr_exec(grn_ctx *ctx, grn_obj *expr, int nargs)
ARITHMETIC_OPERATION_NO_CHECK,
ARITHMETIC_OPERATION_NO_CHECK,
{
- ERR(GRN_INVALID_ARGUMENT, "variable %= \"string\" isn't supported");
+ ERR(GRN_INVALID_ARGUMENT, "variable %%= \"string\" isn't supported");
goto exit;
});
break;
@@ -3231,7 +3231,7 @@ grn_expr_exec(grn_ctx *ctx, grn_obj *expr, int nargs)
ARITHMETIC_OPERATION_ZERO_DIVISION_CHECK,
{
ERR(GRN_INVALID_ARGUMENT,
- "\"string\" % \"string\" "
+ "\"string\" %% \"string\" "
"isn't supported");
goto exit;
}
@@ -3749,7 +3749,7 @@ scan_info_build(grn_ctx *ctx, grn_obj *expr, int *n,
GRN_TEXT_PUTS(ctx, &inspected, ">");
ERR(GRN_INVALID_ARGUMENT,
"invalid expression: can't use column as a value: %.*s",
- GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected));
+ (int)GRN_TEXT_LEN(&inspected), GRN_TEXT_VALUE(&inspected));
GRN_OBJ_FIN(ctx, &inspected);
for (j = 0; j < i; j++) { SI_FREE(sis[j]); }
GRN_FREE(sis);
@@ -5277,7 +5277,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_STAR_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'*=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'*=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5294,7 +5294,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_INCR);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'++' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'++' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
case '=' :
@@ -5303,7 +5303,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_PLUS_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'+=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'+=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
goto exit;
}
break;
@@ -5321,7 +5321,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_DECR);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'--' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'--' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
case '=' :
@@ -5330,7 +5330,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_MINUS_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'-=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'-=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5351,7 +5351,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_OR_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'|=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'|=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5368,7 +5368,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_SLASH_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'/=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'/=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5385,7 +5385,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_MOD_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'%%=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'%%=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5414,7 +5414,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_XOR_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'^=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'^=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5435,7 +5435,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_AND_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'&=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'&=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
case '!' :
@@ -5462,7 +5462,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_SHIFTRR_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'>>>=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'>>>=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5476,7 +5476,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_SHIFTR_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'>>=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'>>=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5505,7 +5505,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_SHIFTL_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'<<=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'<<=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
default :
@@ -5534,7 +5534,7 @@ parse_script(grn_ctx *ctx, efs_info *q)
PARSE(GRN_EXPR_TOKEN_ASSIGN);
} else {
ERR(GRN_UPDATE_NOT_ALLOWED,
- "'=' is not allowed (%.*s)", q->str_end - q->str, q->str);
+ "'=' is not allowed (%.*s)", (int)(q->str_end - q->str), q->str);
}
break;
}
Modified: lib/ii.c (+9 -5)
===================================================================
--- lib/ii.c 2012-05-01 11:33:51 +0900 (caec749)
+++ lib/ii.c 2012-05-01 12:01:25 +0900 (d28f4dd)
@@ -1804,7 +1804,8 @@ grn_p_decv(grn_ctx *ctx, uint8_t *data, uint32_t data_size, datavec *dv, uint32_
}
GRN_ASSERT(dp == dpe);
if (dp != dpe) {
- GRN_LOG(ctx, GRN_LOG_NOTICE, "data_size=%d, %d", data_size, dpe - dp);
+ GRN_LOG(ctx, GRN_LOG_NOTICE, "data_size=%d, %" GRN_FMT_LLD,
+ data_size, (long long int)(dpe - dp));
}
}
return rp - dv[0].data;
@@ -2785,9 +2786,10 @@ buffer_merge(grn_ctx *ctx, grn_ii *ii, uint32_t seg, grn_hash *h,
if (sb->header.chunk_size + S_SEGMENT <= (dcp - dc) + encsize) {
int i;
char buf[255], *bufp;
- GRN_LOG(ctx, GRN_LOG_NOTICE, "cs(%d)+(%d)=(%d)<=(%d)+(%d)=(%d)",
+ GRN_LOG(ctx, GRN_LOG_NOTICE,
+ "cs(%d)+(%d)=(%d)<=(%" GRN_FMT_LLD ")+(%d)=(%" GRN_FMT_LLD ")",
sb->header.chunk_size, S_SEGMENT, sb->header.chunk_size + S_SEGMENT,
- (dcp - dc), encsize, (dcp - dc) + encsize);
+ (long long int)(dcp - dc), encsize, (long long int)((dcp - dc) + encsize));
for (j = 0; j < ii->n_elements; j++) {
GRN_LOG(ctx, GRN_LOG_NOTICE, "rdv[%d] data_size=%d, flags=%d",
j, rdv[j].data_size, rdv[j].flags);
@@ -6647,7 +6649,8 @@ grn_ii_buffer_flush(grn_ctx *ctx, grn_ii_buffer *ii_buffer)
{
ssize_t r = GRN_WRITE(ii_buffer->tmpfd, outbuf, encsize);
if (r != encsize) {
- ERR(GRN_INPUT_OUTPUT_ERROR, "write returned %d != %d", r, encsize);
+ ERR(GRN_INPUT_OUTPUT_ERROR, "write returned %" GRN_FMT_LLD " != %" GRN_FMT_LLU,
+ (long long int)r, (unsigned long long int)encsize);
return;
}
ii_buffer->filepos += r;
@@ -6803,7 +6806,8 @@ grn_ii_buffer_fetch(grn_ctx *ctx, grn_ii_buffer *ii_buffer,
block->buffer = (uint8_t *)r;
block->buffersize = block->nextsize;
} else {
- GRN_LOG(ctx, GRN_LOG_WARNING, "realloc: %d", bytesize);
+ GRN_LOG(ctx, GRN_LOG_WARNING, "realloc: %" GRN_FMT_LLU,
+ (unsigned long long int)bytesize);
return;
}
}
Modified: lib/io.c (+10 -5)
===================================================================
--- lib/io.c 2012-05-01 11:33:51 +0900 (ba61024)
+++ lib/io.c 2012-05-01 12:01:25 +0900 (e19a79b)
@@ -1387,7 +1387,7 @@ grn_io_expire(grn_ctx *ctx, grn_io *io, int count_thresh, uint32_t limit)
break;
}
if (n) {
- GRN_LOG(ctx, GRN_LOG_INFO, "<%x:%x> expired i=%p max=%d (%d/%d)",
+ GRN_LOG(ctx, GRN_LOG_INFO, "<%p:%x> expired i=%p max=%d (%d/%d)",
ctx, grn_gtick, io, io->max_map_seg, n, ln);
}
return n;
@@ -1872,7 +1872,9 @@ grn_mmap(grn_ctx *ctx, fileinfo *fi, off_t offset, size_t length)
}
res = mmap(NULL, length, PROT_READ|PROT_WRITE, flags, fd, offset);
if (MAP_FAILED == res) {
- MERR("mmap(%zu,%d,%d)=%s <%zu>", length, fd, offset, strerror(errno), mmap_size);
+ MERR("mmap(%" GRN_FMT_LLU ",%d,%" GRN_FMT_LLD ")=%s <%" GRN_FMT_LLU ">",
+ (unsigned long long int)length, fd, (long long int)offset, strerror(errno),
+ (unsigned long long int)mmap_size);
return NULL;
}
mmap_size += length;
@@ -1909,7 +1911,8 @@ grn_munmap(grn_ctx *ctx, void *start, size_t length)
res = munmap(start, length);
if (res) {
SERR("munmap");
- GRN_LOG(ctx, GRN_LOG_ERROR, "munmap(%p,%d) failed <%zu>", start, length, mmap_size);
+ GRN_LOG(ctx, GRN_LOG_ERROR, "munmap(%p,%" GRN_FMT_LLU ") failed <%" GRN_FMT_LLU ">",
+ start, (unsigned long long int)length, (unsigned long long int)mmap_size);
} else {
mmap_size -= length;
}
@@ -1925,7 +1928,8 @@ grn_pread(grn_ctx *ctx, fileinfo *fi, void *buf, size_t count, off_t offset)
SERR("pread");
} else {
/* todo : should retry ? */
- ERR(GRN_INPUT_OUTPUT_ERROR, "pread returned %d != %d", r, count);
+ ERR(GRN_INPUT_OUTPUT_ERROR, "pread returned %" GRN_FMT_LLD " != %" GRN_FMT_LLU,
+ (long long int)r, (unsigned long long int)count);
}
return ctx->rc;
}
@@ -1941,7 +1945,8 @@ grn_pwrite(grn_ctx *ctx, fileinfo *fi, void *buf, size_t count, off_t offset)
SERR("pwrite");
} else {
/* todo : should retry ? */
- ERR(GRN_INPUT_OUTPUT_ERROR, "pwrite returned %d != %d", r, count);
+ ERR(GRN_INPUT_OUTPUT_ERROR, "pwrite returned %" GRN_FMT_LLD " != %" GRN_FMT_LLU,
+ (long long int)r, (unsigned long long int)count);
}
return ctx->rc;
}