Loading cmds/incidentd/src/PrivacyBuffer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ status_t PrivacyBuffer::stripField(const Privacy* parentPolicy, const PrivacySpe // iterator will point to head of next field size_t currentAt = mData.rp()->pos(); writeFieldOrSkip(fieldTag, skip); VLOG("[Depth %2d]Field %d %ss %d bytes", depth, fieldId, skip ? "skip" : "write", (int)(get_varint_size(fieldTag) + mData.rp()->pos() - currentAt)); VLOG("[Depth %2d]Field %d %ss %zu bytes", depth, fieldId, skip ? "skip" : "write", get_varint_size(fieldTag) + mData.rp()->pos() - currentAt); return NO_ERROR; } // current field is message type and its sub-fields have extra privacy policies Loading cmds/incidentd/src/Throttler.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "Throttler.h" #include <inttypes.h> #include <utils/SystemClock.h> namespace android { Loading @@ -42,15 +43,15 @@ bool Throttler::shouldThrottle() { } void Throttler::addReportSize(size_t reportByteSize) { VLOG("The current request took %d bytes to dropbox", (int)reportByteSize); VLOG("The current request took %zu bytes to dropbox", reportByteSize); mAccumulatedSize += reportByteSize; } void Throttler::dump(FILE* out) { fprintf(out, "mSizeLimit=%d\n", (int)mSizeLimit); fprintf(out, "mAccumulatedSize=%d\n", (int)mAccumulatedSize); fprintf(out, "mRefractoryPeriodMs=%d\n", (int)mRefractoryPeriodMs); fprintf(out, "mLastRefractoryMs=%d\n", (int)mLastRefractoryMs); fprintf(out, "mSizeLimit=%zu\n", mSizeLimit); fprintf(out, "mAccumulatedSize=%zu\n", mAccumulatedSize); fprintf(out, "mRefractoryPeriodMs=%" PRIi64 "\n", mRefractoryPeriodMs); fprintf(out, "mLastRefractoryMs=%" PRIi64 "\n", mLastRefractoryMs); } } // namespace incidentd Loading cmds/incidentd/tests/Reporter_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ TEST_F(ReporterTest, RunReportToGivenDirectory) { ASSERT_EQ(Reporter::REPORT_FINISHED, reporter->runReport(&size)); vector<string> results = InspectFiles(); ASSERT_EQ((int)results.size(), 1); ASSERT_EQ(results.size(), 1UL); EXPECT_EQ(results[0], "\n\x2" "\b\f\n\x6" Loading Loading
cmds/incidentd/src/PrivacyBuffer.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -86,8 +86,8 @@ status_t PrivacyBuffer::stripField(const Privacy* parentPolicy, const PrivacySpe // iterator will point to head of next field size_t currentAt = mData.rp()->pos(); writeFieldOrSkip(fieldTag, skip); VLOG("[Depth %2d]Field %d %ss %d bytes", depth, fieldId, skip ? "skip" : "write", (int)(get_varint_size(fieldTag) + mData.rp()->pos() - currentAt)); VLOG("[Depth %2d]Field %d %ss %zu bytes", depth, fieldId, skip ? "skip" : "write", get_varint_size(fieldTag) + mData.rp()->pos() - currentAt); return NO_ERROR; } // current field is message type and its sub-fields have extra privacy policies Loading
cmds/incidentd/src/Throttler.cpp +6 −5 Original line number Diff line number Diff line Loading @@ -18,6 +18,7 @@ #include "Throttler.h" #include <inttypes.h> #include <utils/SystemClock.h> namespace android { Loading @@ -42,15 +43,15 @@ bool Throttler::shouldThrottle() { } void Throttler::addReportSize(size_t reportByteSize) { VLOG("The current request took %d bytes to dropbox", (int)reportByteSize); VLOG("The current request took %zu bytes to dropbox", reportByteSize); mAccumulatedSize += reportByteSize; } void Throttler::dump(FILE* out) { fprintf(out, "mSizeLimit=%d\n", (int)mSizeLimit); fprintf(out, "mAccumulatedSize=%d\n", (int)mAccumulatedSize); fprintf(out, "mRefractoryPeriodMs=%d\n", (int)mRefractoryPeriodMs); fprintf(out, "mLastRefractoryMs=%d\n", (int)mLastRefractoryMs); fprintf(out, "mSizeLimit=%zu\n", mSizeLimit); fprintf(out, "mAccumulatedSize=%zu\n", mAccumulatedSize); fprintf(out, "mRefractoryPeriodMs=%" PRIi64 "\n", mRefractoryPeriodMs); fprintf(out, "mLastRefractoryMs=%" PRIi64 "\n", mLastRefractoryMs); } } // namespace incidentd Loading
cmds/incidentd/tests/Reporter_test.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -176,7 +176,7 @@ TEST_F(ReporterTest, RunReportToGivenDirectory) { ASSERT_EQ(Reporter::REPORT_FINISHED, reporter->runReport(&size)); vector<string> results = InspectFiles(); ASSERT_EQ((int)results.size(), 1); ASSERT_EQ(results.size(), 1UL); EXPECT_EQ(results[0], "\n\x2" "\b\f\n\x6" Loading