diff --git a/compiler2/Type_codegen.cc b/compiler2/Type_codegen.cc index 170ec49df90ce8e6d2a1b460e35deb31dd01e0af..f6225b8938ae4008a5f3a280742d673a8607ded2 100644 --- a/compiler2/Type_codegen.cc +++ b/compiler2/Type_codegen.cc @@ -3037,7 +3037,7 @@ void Type::generate_json_schema_array(JSON_Tokenizer& json) "\"record of\"" : "\"set of\""); } else { // set the number of elements for arrays - char* size_str = mprintf("%zu", get_nof_comps()); + char* size_str = mprintf("%lu", (unsigned long)(get_nof_comps())); json.put_next_token(JSON_TOKEN_NAME, "minItems"); json.put_next_token(JSON_TOKEN_NUMBER, size_str); json.put_next_token(JSON_TOKEN_NAME, "maxItems"); diff --git a/compiler2/ttcn3/compiler.y b/compiler2/ttcn3/compiler.y index 1f56362b50217781bfbea4481e4ae662286308f6..baf1a8e339337b6360f8ea0efd77427fc3f37066 100644 --- a/compiler2/ttcn3/compiler.y +++ b/compiler2/ttcn3/compiler.y @@ -8746,8 +8746,8 @@ PredefinedOps: { if ($3->get_nof_logargs() != 1) { Location loc(infile, @1); - loc.error("The any2unistr function takes exactly one argument, not %zu.", - $3->get_nof_logargs()); + loc.error("The any2unistr function takes exactly one argument, not %lu.", + (unsigned long)($3->get_nof_logargs())); delete $3; $$ = new Value(Value::OPTYPE_ANY2UNISTR, new LogArguments()); $$->set_location(infile, @$); diff --git a/core/ProfilerTools.cc b/core/ProfilerTools.cc index a8cd12dd68befbff736ed9db45eed8838f5f9bed..b5c9db6deb7cdee2f87bbc0adb3b99247e74aac0 100644 --- a/core/ProfilerTools.cc +++ b/core/ProfilerTools.cc @@ -896,8 +896,8 @@ namespace Profiler_Tools { // number of lines and functions if (p_flags & STATS_NUMBER_OF_LINES) { - line_func_count_str = mputprintf(line_func_count_str, "%s:\t%zu lines,\t%zu functions\n", - p_db[i].filename, p_db[i].lines.size(), p_db[i].functions.size()); + line_func_count_str = mputprintf(line_func_count_str, "%s:\t%lu lines,\t%lu functions\n", + p_db[i].filename, (unsigned long)(p_db[i].lines.size()), (unsigned long)(p_db[i].functions.size())); } total_code_lines += p_db[i].lines.size(); total_functions += p_db[i].functions.size(); @@ -905,7 +905,7 @@ namespace Profiler_Tools { if (p_flags & STATS_NUMBER_OF_LINES) { line_func_count_str = mputprintf(line_func_count_str, "--------------------------------------\n" - "Total:\t%zu lines,\t%zu functions\n", total_code_lines, total_functions); + "Total:\t%lu lines,\t%lu functions\n", (unsigned long)total_code_lines, (unsigned long)total_functions); } if (p_flags & (STATS_TOP10_ALL_DATA | STATS_ALL_DATA_SORTED)) { diff --git a/core/Runtime.cc b/core/Runtime.cc index 44c4ce1786678f61e9b7178281d9dfc40245443e..fd4423e6a8b00ff206f17c0385f5a0d8fd89e53e 100644 --- a/core/Runtime.cc +++ b/core/Runtime.cc @@ -2895,7 +2895,7 @@ void TTCN_Runtime::wait_terminated_processes() errno = 0; for ( ; ; ) { int statuscode; - struct rusage r_usage = {{0,0},{0,0},0,0,0,0,0,0,0,0,0,0,0,0,0,0}; + struct rusage r_usage = {{0,0},{0,0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0},{0}}; #ifdef INTERIX pid_t child_pid = waitpid(-1, &statuscode, WNOHANG); getrusage(RUSAGE_CHILDREN, &r_usage);