switch to using zu for some size_t variables in printf

This commit is contained in:
Alec Grieser 2018-03-14 18:07:05 -07:00
parent 70a05c1a9b
commit 0853fcb052
No known key found for this signature in database
GPG Key ID: CAF63551C60D3462
6 changed files with 11 additions and 11 deletions

View File

@ -1574,7 +1574,7 @@ ACTOR static Future<Void> doInstructions(Reference<FlowTesterData> data) {
try {
if(LOG_INSTRUCTIONS) {
if(op != LiteralStringRef("SWAP") && op != LiteralStringRef("PUSH")) {
printf("%lu. %s\n", idx, tupleToString(opTuple).c_str());
printf("%zu. %s\n", idx, tupleToString(opTuple).c_str());
fflush(stdout);
}
}

View File

@ -2583,7 +2583,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
} else if(address_interface.size() == 1) {
printf("\nThe following address can be killed:\n");
} else {
printf("\nThe following %lu addresses can be killed:\n", address_interface.size());
printf("\nThe following %zu addresses can be killed:\n", address_interface.size());
}
for( auto it : address_interface ) {
printf("%s\n", printable(it.first).c_str());
@ -2596,7 +2596,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
if (address_interface.size() == 0) {
printf("ERROR: no processes to kill. You must run the `kill command before running `kill all.\n");
} else {
printf("Attempted to kill %lu processes\n", address_interface.size());
printf("Attempted to kill %zu processes\n", address_interface.size());
}
} else {
for(int i = 1; i < tokens.size(); i++) {
@ -2611,7 +2611,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
for(int i = 1; i < tokens.size(); i++) {
tr->set(LiteralStringRef("\xff\xff/reboot_worker"), address_interface[tokens[i]]);
}
printf("Attempted to kill %lu processes\n", tokens.size() - 1);
printf("Attempted to kill %zu processes\n", tokens.size() - 1);
}
}
continue;
@ -2807,7 +2807,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
} else if(address_interface.size() == 1) {
printf("\nThe following address can be checked:\n");
} else {
printf("\nThe following %lu addresses can be checked:\n", address_interface.size());
printf("\nThe following %zu addresses can be checked:\n", address_interface.size());
}
for( auto it : address_interface ) {
printf("%s\n", printable(it.first).c_str());
@ -2820,7 +2820,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
if (address_interface.size() == 0) {
printf("ERROR: no processes to check. You must run the `expensive_data_check command before running `expensive_data_check all.\n");
} else {
printf("Attempted to kill and check %lu processes\n", address_interface.size());
printf("Attempted to kill and check %zu processes\n", address_interface.size());
}
} else {
for(int i = 1; i < tokens.size(); i++) {
@ -2835,7 +2835,7 @@ ACTOR Future<int> cli(CLIOptions opt, LineNoise* plinenoise) {
for(int i = 1; i < tokens.size(); i++) {
tr->set(LiteralStringRef("\xff\xff/reboot_and_check_worker"), address_interface[tokens[i]]);
}
printf("Attempted to kill and check %lu processes\n", tokens.size() - 1);
printf("Attempted to kill and check %zu processes\n", tokens.size() - 1);
}
}
continue;

View File

@ -989,7 +989,7 @@ TEST_CASE("flow/flow/perf/actor patterns")
ASSERT(out2[i].isReady());
}
printf("2xcheeseActor(chooseTwoActor(cheeseActor(fifo), never)): %0.2f M/sec\n", N / 1e6 / (timer() - start));
printf("sizeof(CheeseWaitActorActor) == %lu\n", sizeof(CheeseWaitActorActor));
printf("sizeof(CheeseWaitActorActor) == %zu\n", sizeof(CheeseWaitActorActor));
}
{

View File

@ -79,7 +79,7 @@ bool testFuzzActor( Future<int>(*actor)(FutureStream<int> const&, PromiseStream<
}
}
if (outCount+1 != expectedOutput.size()) {
printf("\tERROR: %s output length incorrect: %d != expected %lu\n", desc, outCount+1, expectedOutput.size());
printf("\tERROR: %s output length incorrect: %d != expected %zu\n", desc, outCount+1, expectedOutput.size());
if (trial) printf("\t\tResult was inconsistent between runs!\n");
ok = false;
//return false;

View File

@ -3321,7 +3321,7 @@ Possibilities:
void versionedMapTest() {
VersionedMap<int,int> vm;
printf("SS Ptree node is %lu bytes\n", sizeof( StorageServer::VersionedData::PTreeT ) );
printf("SS Ptree node is %zu bytes\n", sizeof( StorageServer::VersionedData::PTreeT ) );
const int NSIZE = sizeof(VersionedMap<int,int>::PTreeT);
const int ASIZE = NSIZE<=64 ? 64 : NextPowerOfTwo<NSIZE>::Result;

View File

@ -70,7 +70,7 @@ struct UnitTestWorkload : TestWorkload {
tests.push_back(t);
}
}
fprintf(stdout, "Found %lu tests\n", tests.size());
fprintf(stdout, "Found %zu tests\n", tests.size());
g_random->randomShuffle(tests);
if (self->testRunLimit > 0 && tests.size() > self->testRunLimit)
tests.resize(self->testRunLimit);