[Tarantool-patches] [PATCH 4/5] error: provide MP_ERROR extension serializer

Vladislav Shpilevoy v.shpilevoy at tarantool.org
Thu May 21 00:57:05 MSK 2020


I added explicit casts when print uint64 in mp_error.cc,
since some compilers complain about %lld != uint64_t, as
noticed by Alexander T.

====================
diff --git a/src/box/mp_error.cc b/src/box/mp_error.cc
index badf7ee92..61cf5e1b8 100644
--- a/src/box/mp_error.cc
+++ b/src/box/mp_error.cc
@@ -657,7 +657,7 @@ mp_print_error_one(MP_PRINT_ARGS_DECL, const char **data, int depth)
 		if (key < MP_ERROR_MAX)
 			MP_PRINT(total, "%s", mp_error_field_to_json_key[key]);
 		else
-			MP_PRINT(total, "%llu: ", key);
+			MP_PRINT(total, "%llu: ", (unsigned long long)key);
 		MP_PRINT_2(total, mp_print_common, data, depth);
 	}
 	MP_PRINT(total, "}");
@@ -717,7 +717,7 @@ mp_print_error(MP_PRINT_ARGS_DECL, const char **data, int depth)
 			break;
 		}
 		default:
-			MP_PRINT(total, "%llu: ", key);
+			MP_PRINT(total, "%llu: ", (unsigned long long)key);
 			MP_PRINT_2(total, mp_print_common, data, depth);
 			break;
 		}


More information about the Tarantool-patches mailing list