diff --git a/src/DebugCmds.cc b/src/DebugCmds.cc index 57d85a3647..83a485a60a 100644 --- a/src/DebugCmds.cc +++ b/src/DebugCmds.cc @@ -83,7 +83,7 @@ static void choose_global_symbols_regex(const string& regex, vectorName()); + zeek::detail::debug_msg("[%zu] %s\n", i+1, choices[i]->Name()); zeek::detail::debug_msg("[a] All of the above\n"); zeek::detail::debug_msg("[n] None of the above\n"); diff --git a/src/Dict.cc b/src/Dict.cc index 6eee1ef840..626967beee 100644 --- a/src/Dict.cc +++ b/src/Dict.cc @@ -446,7 +446,7 @@ void Dictionary::DumpKeys() const DistanceStats(max_distance); if ( binary ) { - sprintf(key_file, "%d.%d.%lu-%c.key", Length(), max_distance, MemoryAllocation()/Length(), rand()%26 + 'A'); + sprintf(key_file, "%d.%d.%zu-%c.key", Length(), max_distance, MemoryAllocation()/Length(), rand()%26 + 'A'); std::ofstream f(key_file, std::ios::binary|std::ios::out|std::ios::trunc); for ( int idx = 0; idx < Capacity(); idx++ ) if ( ! table[idx].Empty() ) @@ -458,7 +458,7 @@ void Dictionary::DumpKeys() const } else { - sprintf(key_file, "%d.%d.%lu-%d.ckey",Length(), max_distance, MemoryAllocation()/Length(), rand()%26 + 'A'); + sprintf(key_file, "%d.%d.%zu-%d.ckey",Length(), max_distance, MemoryAllocation()/Length(), rand()%26 + 'A'); std::ofstream f(key_file, std::ios::out|std::ios::trunc); for ( int idx = 0; idx < Capacity(); idx++ ) if ( ! table[idx].Empty() ) @@ -506,7 +506,7 @@ void Dictionary::Dump(int level) const int distances[DICT_NUM_DISTANCES]; int max_distance = 0; DistanceStats(max_distance, distances, DICT_NUM_DISTANCES); - printf("cap %'7d ent %'7d %'-7d load %.2f max_dist %2d mem %10zu mem/ent %3lu key/ent %3d lg %2d remaps %1d remap_end %4d ", + printf("cap %'7d ent %'7d %'-7d load %.2f max_dist %2d mem %10zu mem/ent %3zu key/ent %3d lg %2d remaps %1d remap_end %4d ", Capacity(), Length(), MaxLength(), (double)Length()/(table? Capacity() : 1), max_distance, MemoryAllocation(), (MemoryAllocation())/(Length()?Length():1), key_size / (Length()?Length():1), log2_buckets, remaps, remap_end); diff --git a/src/broker/Manager.cc b/src/broker/Manager.cc index 358028d82c..c83b75abde 100644 --- a/src/broker/Manager.cc +++ b/src/broker/Manager.cc @@ -1198,7 +1198,7 @@ void Manager::ProcessEvent(const broker::topic& topic, broker::zeek::Event ev) { auto expected_name = zeek::type_name(expected_type->Tag()); - zeek::reporter->Warning("failed to convert remote event '%s' arg #%lu," + zeek::reporter->Warning("failed to convert remote event '%s' arg #%zu," " got %s, expected %s", name.data(), i, got_type, expected_name); @@ -1268,7 +1268,7 @@ bool bro_broker::Manager::ProcessLogCreate(broker::zeek::LogCreate lc) fields[i] = field; else { - zeek::reporter->Warning("failed to convert remote log field # %lu", i); + zeek::reporter->Warning("failed to convert remote log field # %zu", i); delete [] fields; return false; } diff --git a/src/util.cc b/src/util.cc index 7ddcd6b833..417aed4d2b 100644 --- a/src/util.cc +++ b/src/util.cc @@ -1148,7 +1148,8 @@ void init_random_seed(const char* read_file, const char* write_file, #endif if ( pos < zeek::detail::KeyedHash::SEED_INIT_SIZE ) - zeek::reporter->FatalError("Could not read enough random data. Wanted %d, got %lu", zeek::detail::KeyedHash::SEED_INIT_SIZE, pos); + zeek::reporter->FatalError("Could not read enough random data. Wanted %d, got %zu", + zeek::detail::KeyedHash::SEED_INIT_SIZE, pos); if ( ! seed ) {