Snap for 13256841 from e54380ff24721fbadc1017e6a3bfef4e1c28f335 to 25Q2-release

Change-Id: I6915facf9858f9cca6c42b2d49f6beed992ce2c7
diff --git a/Android.bp b/Android.bp
index 14a195b..fd5b5cf 100644
--- a/Android.bp
+++ b/Android.bp
@@ -43,20 +43,40 @@
     cflags: [
         "-Wall",
         "-Werror",
+        "-Werror=conditional-uninitialized",
+        "-Werror=implicit-fallthrough",
+        "-Werror=sometimes-uninitialized",
         "-Wextra",
         "-Wnullable-to-nonnull-conversion",
+        "-Wshadow",
+        "-Wsign-compare",
+        "-Wtautological-unsigned-zero-compare",
         "-Wthread-safety",
+        "-Wuninitialized",
         "-Wunused-parameter",
     ],
     tidy: true,
     tidy_checks: [
         "android-*",
+        "bugprone-*",
         "cert-*",
         "-cert-err34-c",
         "clang-analyzer-security*",
         // Many calls to snprintf/sscanf/memset/memcpy in libbpf.c have the following warning.
         "-clang-analyzer-security.insecureAPI.DeprecatedOrUnsafeBufferHandling",
+        "google-*",
         // Disabling due to many unavoidable warnings from POSIX API usage.
         "-google-runtime-int",
+        "misc-*",
+        "performance-*",
+    ],
+    tidy_checks_as_errors: [
+        "android-*",
+        "bugprone-*",
+        "cert-*",
+        "clang-analyzer-security*",
+        "google-*",
+        "misc-*",
+        "performance-*",
     ],
 }
diff --git a/loader/Loader.cpp b/loader/Loader.cpp
index 89bdb80..940ce19 100644
--- a/loader/Loader.cpp
+++ b/loader/Loader.cpp
@@ -431,9 +431,9 @@
         vector<string> csSymNames;
         ret = getSectionSymNames(elfFile, oldName, csSymNames, STT_FUNC);
         if (ret || !csSymNames.size()) return ret;
-        for (size_t i = 0; i < progDefNames.size(); ++i) {
-            if (!progDefNames[i].compare(csSymNames[0] + "_def")) {
-                cs_temp.prog_def = pd[i];
+        for (size_t j = 0; j < progDefNames.size(); ++j) {
+            if (!progDefNames[j].compare(csSymNames[0] + "_def")) {
+                cs_temp.prog_def = pd[j];
                 break;
             }
         }