Fix compiler warnings emmited from system/egl/egl.cpp.

Bug: b/80194417
Test: Recompile and check for warnings.
Change-Id: Ie9c301ddb14d7c49a1106aac1255eb47d626adf1
diff --git a/system/egl/egl.cpp b/system/egl/egl.cpp
index 0afa3ff..ecfddb6 100644
--- a/system/egl/egl.cpp
+++ b/system/egl/egl.cpp
@@ -291,7 +291,7 @@
     void        setTextureTarget(EGLint _texTarget) { texTarget = _texTarget; }
     EGLint      getTextureTarget() { return texTarget; }
 
-    virtual     void setCollectingTimestamps(EGLint collect) { }
+    virtual     void setCollectingTimestamps(EGLint) { }
     virtual     EGLint isCollectingTimestamps() const { return EGL_FALSE; }
     EGLint      deletePending;
     void        setIsCurrent(bool isCurrent) { mIsCurrent = isCurrent; }
@@ -321,8 +321,8 @@
 };
 
 egl_surface_t::egl_surface_t(EGLDisplay dpy, EGLConfig config, EGLint surfaceType)
-    : dpy(dpy), config(config), surfaceType(surfaceType), rcSurface(0),
-      deletePending(0), mIsCurrent(false)
+    : dpy(dpy), config(config), deletePending(0), mIsCurrent(false),
+      surfaceType(surfaceType), rcSurface(0)
 {
     width = 0;
     height = 0;
@@ -721,14 +721,14 @@
     int extStart = 0;
     int extEnd = 0;
     int currentExtIndex = 0;
-    int numExts = 0;
 
     if (sWantES30OrAbove(hostStr) &&
         !strstr(hostStr, kOESEGLImageExternalEssl3)) {
         res.push_back(kOESEGLImageExternalEssl3);
     }
 
-    while (extEnd < strlen(hostStr)) {
+    const int hostStrLen = strlen(hostStr);
+    while (extEnd < hostStrLen) {
         if (hostStr[extEnd] == ' ') {
             int extSz = extEnd - extStart;
             res.push_back(std::string(hostStr + extStart, extSz));
@@ -786,7 +786,7 @@
         std::vector<std::string> exts = getExtStringArray();
 
         int totalSz = 1; // null terminator
-        for (int i = 0; i < exts.size(); i++) {
+        for (unsigned int i = 0; i < exts.size(); i++) {
             totalSz += exts[i].size() + 1; // for space
         }
 
@@ -796,7 +796,7 @@
         memset(hostStr, 0, totalSz);
 
         char* current = hostStr;
-        for (int i = 0; i < exts.size(); i++) {
+        for (unsigned int i = 0; i < exts.size(); i++) {
             memcpy(current, exts[i].c_str(), exts[i].size());
             current += exts[i].size();
             *current = ' ';
@@ -828,8 +828,8 @@
 // ----------------------------------------------------------------------------
 
 static EGLClient_eglInterface s_eglIface = {
-    getThreadInfo: getEGLThreadInfo,
-    getGLString: getGLString,
+    .getThreadInfo = getEGLThreadInfo,
+    .getGLString = getGLString,
 };
 
 #define DBG_FUNC DBG("%s\n", __FUNCTION__)
@@ -1112,7 +1112,6 @@
     VALIDATE_DISPLAY_INIT(dpy, EGL_FALSE);
     VALIDATE_SURFACE_RETURN(eglSurface, EGL_FALSE);
 
-    EGLThreadInfo* tInfo = getEGLThreadInfo();
     egl_surface_t* surface(static_cast<egl_surface_t*>(eglSurface));
     if (surface->isCurrent()) {
         surface->deletePending = 1;
@@ -1445,7 +1444,6 @@
     EGLint minorVersion = 0;
     EGLint context_flags = 0;
     EGLint profile_mask = 0;
-    EGLint reset_notification_strategy = 0;
 
     bool wantedMajorVersion = false;
     bool wantedMinorVersion = false;