Fix compile errors.

This commit is contained in:
Jens Elofsson 2020-06-04 09:22:37 +02:00
parent f409152691
commit b1e74b227c
2 changed files with 4 additions and 1 deletions

View File

@ -191,7 +191,7 @@ void GreedyMemoryPlanner::CalculateOffsetsIfNeeded() {
// Work through the rest of the buffers to find a good gap to place each one.
for (int i = 1; i < buffer_count_; ++i) {
// The id is the order the buffer was originally added by the client.
const int buffer_id = buffer_ids_sorted_[i];
buffer_id = buffer_ids_sorted_[i];
// Look at what size and time range the buffer needs to be active.
BufferRequirements* wanted_requirements = &requirements_[buffer_id];
const int wanted_size = wanted_requirements->size;

View File

@ -99,6 +99,9 @@ TfLiteStatus AllocateVariables(
// not called by default. Hence it's not linked in to the final binary code.
TfLiteStatus CheckOfflinePlannedOffsets(const Model* model,
ErrorReporter* error_reporter) {
// Suppress compile warning for unused function
(void)CheckOfflinePlannedOffsets;
if (model->metadata()) {
for (size_t i = 0; i < model->metadata()->size(); ++i) {
auto metadata = model->metadata()->Get(i);