Skip to content

Commit 148dbc9

Browse files
committed
Fix a mismatching size warning
``` ext/mysql2/result.c:259:55: warning: format specifies type 'long' but the argument has type 'int' [-Wformat] rb_field_type = rb_sprintf("decimal(%ld,%d)", precision, field->decimals); ```
1 parent 217ac2e commit 148dbc9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

ext/mysql2/result.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ static VALUE rb_mysql_result_fetch_field_type(VALUE self, unsigned int idx) {
256256
https://github.com/mysql/mysql-server/blob/ea7d2e2d16ac03afdd9cb72a972a95981107bf51/sql/field.cc#L2246
257257
*/
258258
precision = field->length - (field->decimals > 0 ? 2 : 1);
259-
rb_field_type = rb_sprintf("decimal(%ld,%d)", precision, field->decimals);
259+
rb_field_type = rb_sprintf("decimal(%d,%d)", precision, field->decimals);
260260
break;
261261
case MYSQL_TYPE_STRING: // char[]
262262
if (field->flags & ENUM_FLAG) {

0 commit comments

Comments
 (0)