Snap for 9781156 from 54fceaea608baab7c56284b4921d6b6d1c312e97 to udc-d1-release

Change-Id: I930d6e57a546394bccf68b2cea0443df0d6f0b30
diff --git a/native/jni/src/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp b/native/jni/src/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp
index 30b72bb..317710c 100644
--- a/native/jni/src/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp
+++ b/native/jni/src/dictionary/structure/backward/v402/content/terminal_position_lookup_table.cpp
@@ -82,14 +82,12 @@
 }
 
 bool TerminalPositionLookupTable::runGCTerminalIds(TerminalIdMap *const terminalIdMap) {
-    int removedEntryCount = 0;
     int nextNewTerminalId = 0;
     for (int i = 0; i < mSize; ++i) {
         const int terminalPos = getBuffer()->readUint(
                 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(i));
         if (terminalPos == Ver4DictConstants::NOT_A_TERMINAL_ADDRESS) {
             // This entry is a garbage.
-            removedEntryCount++;
         } else {
             // Give a new terminal id to the entry.
             if (!getWritableBuffer()->writeUint(terminalPos,
diff --git a/native/jni/src/dictionary/structure/v4/content/terminal_position_lookup_table.cpp b/native/jni/src/dictionary/structure/v4/content/terminal_position_lookup_table.cpp
index 5503151..e4d7c2d 100644
--- a/native/jni/src/dictionary/structure/v4/content/terminal_position_lookup_table.cpp
+++ b/native/jni/src/dictionary/structure/v4/content/terminal_position_lookup_table.cpp
@@ -71,14 +71,12 @@
 }
 
 bool TerminalPositionLookupTable::runGCTerminalIds(TerminalIdMap *const terminalIdMap) {
-    int removedEntryCount = 0;
     int nextNewTerminalId = 0;
     for (int i = 0; i < mSize; ++i) {
         const int terminalPos = getBuffer()->readUint(
                 Ver4DictConstants::TERMINAL_ADDRESS_TABLE_ADDRESS_SIZE, getEntryPos(i));
         if (terminalPos == Ver4DictConstants::NOT_A_TERMINAL_ADDRESS) {
             // This entry is a garbage.
-            removedEntryCount++;
         } else {
             // Give a new terminal id to the entry.
             if (!getWritableBuffer()->writeUint(terminalPos,
diff --git a/native/jni/src/dictionary/utils/trie_map.cpp b/native/jni/src/dictionary/utils/trie_map.cpp
index 0bef8c7..19ad9c5 100644
--- a/native/jni/src/dictionary/utils/trie_map.cpp
+++ b/native/jni/src/dictionary/utils/trie_map.cpp
@@ -53,7 +53,7 @@
     for (int i = from; i < to; ++i) {
         AKLOGI("Entry[%d]: %x, %x", i, readField0(i), readField1(i));
     }
-    int unusedRegionSize = 0;
+    [[maybe_unused]] int unusedRegionSize = 0;
     for (int i = 1; i <= MAX_NUM_OF_ENTRIES_IN_ONE_LEVEL; ++i) {
         int index = readEmptyTableLink(i);
         while (index != ROOT_BITMAP_ENTRY_INDEX) {
diff --git a/native/jni/src/suggest/core/layout/proximity_info_state_utils.cpp b/native/jni/src/suggest/core/layout/proximity_info_state_utils.cpp
index 0aeb36a..0aa6caf 100644
--- a/native/jni/src/suggest/core/layout/proximity_info_state_utils.cpp
+++ b/native/jni/src/suggest/core/layout/proximity_info_state_utils.cpp
@@ -490,12 +490,10 @@
     const int x0 = (*sampledInputXs)[id];
     const int y0 = (*sampledInputYs)[id];
     const int actualInputIndex = (*sampledInputIndices)[id];
-    int tempTime = 0;
     int tempBeelineDistance = 0;
     int start = actualInputIndex;
     // lookup forward
     while (start > 0 && tempBeelineDistance < lookupRadius) {
-        tempTime += times[start] - times[start - 1];
         --start;
         tempBeelineDistance = GeometryUtils::getDistanceInt(x0, y0, xCoordinates[start],
                 yCoordinates[start]);
@@ -504,12 +502,10 @@
     if (start > 0 && start < actualInputIndex) {
         ++start;
     }
-    tempTime= 0;
     tempBeelineDistance = 0;
     int end = actualInputIndex;
     // lookup backward
     while (end < (inputSize - 1) && tempBeelineDistance < lookupRadius) {
-        tempTime += times[end + 1] - times[end];
         ++end;
         tempBeelineDistance = GeometryUtils::getDistanceInt(x0, y0, xCoordinates[end],
                 yCoordinates[end]);
diff --git a/native/jni/src/suggest/core/layout/proximity_info_utils.h b/native/jni/src/suggest/core/layout/proximity_info_utils.h
index 79d0615..0037961 100644
--- a/native/jni/src/suggest/core/layout/proximity_info_utils.h
+++ b/native/jni/src/suggest/core/layout/proximity_info_utils.h
@@ -72,7 +72,7 @@
             for (int i = 0; i < inputSize; ++i) {
                 AKLOGI("---");
                 for (int j = 0; j < MAX_PROXIMITY_CHARS_SIZE; ++j) {
-                    int proximityChar =
+                    [[maybe_unused]] int proximityChar =
                             inputProximities[i * MAX_PROXIMITY_CHARS_SIZE + j];
                     proximityChar += 0;
                     AKLOGI("--- (%d)%c", i, proximityChar);
diff --git a/native/jni/src/suggest/core/result/suggestion_results.cpp b/native/jni/src/suggest/core/result/suggestion_results.cpp
index 3756d10..312c9e7 100644
--- a/native/jni/src/suggest/core/result/suggestion_results.cpp
+++ b/native/jni/src/suggest/core/result/suggestion_results.cpp
@@ -97,7 +97,7 @@
         suggestedWords.push_back(copyOfSuggestedWords.top());
         copyOfSuggestedWords.pop();
     }
-    int index = 0;
+    [[maybe_unused]] int index = 0;
     for (auto it = suggestedWords.rbegin(); it != suggestedWords.rend(); ++it) {
         DUMP_SUGGESTION(it->getCodePoint(), it->getCodePointCount(), index, it->getScore());
         index++;