error: format '%d' expects argument of type 'int', but argument 5 has type 'int64_t {aka long int}' [-Werror=format=]
原因:数据格式化不正确,可能导致在32位和64位机上编译器解释不统一。
解决:
#include <inttypes.h>
printf("%" PRId64 "\n", value);
error: format '%d' expects argument of type 'int', but argument 5 has type 'int64_t {aka long int}' [-Werror=format=]
原因:数据格式化不正确,可能导致在32位和64位机上编译器解释不统一。
解决:
#include <inttypes.h>
printf("%" PRId64 "\n", value);