<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">Fix:

warning: add explicit braces to avoid dangling else [-Wdangling-else]
warning: equality comparison with extraneous parentheses [-Wparentheses-equality]

Simplification of part of
https://github.com/libkml/libkml/commit/d4adfd8a8862ce460314e514b26cffc9815f06ea
--- src/kml/base/contrib/minizip/unzip.c.orig	2015-12-21 11:23:05.000000000 -0600
+++ src/kml/base/contrib/minizip/unzip.c	2024-07-24 12:08:19.000000000 -0500
@@ -638,10 +638,12 @@
 
     /* we check the magic */
     if (err==UNZ_OK)
+    {
         if (unzlocal_getLong(&amp;s-&gt;z_filefunc, s-&gt;filestream,&amp;uMagic) != UNZ_OK)
             err=UNZ_ERRNO;
         else if (uMagic!=0x02014b50)
             err=UNZ_BADZIPFILE;
+    }
 
     if (unzlocal_getShort(&amp;s-&gt;z_filefunc, s-&gt;filestream,&amp;file_info.version) != UNZ_OK)
         err=UNZ_ERRNO;
@@ -718,10 +720,12 @@
             uSizeRead = extraFieldBufferSize;
 
         if (lSeek!=0)
+        {
             if (ZSEEK(s-&gt;z_filefunc, s-&gt;filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
                 lSeek=0;
             else
                 err=UNZ_ERRNO;
+        }
         if ((file_info.size_file_extra&gt;0) &amp;&amp; (extraFieldBufferSize&gt;0))
             if (ZREAD(s-&gt;z_filefunc, s-&gt;filestream,extraField,uSizeRead)!=uSizeRead)
                 err=UNZ_ERRNO;
@@ -743,10 +747,12 @@
             uSizeRead = commentBufferSize;
 
         if (lSeek!=0)
+        {
             if (ZSEEK(s-&gt;z_filefunc, s-&gt;filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
                 lSeek=0;
             else
                 err=UNZ_ERRNO;
+        }
         if ((file_info.size_file_comment&gt;0) &amp;&amp; (commentBufferSize&gt;0))
             if (ZREAD(s-&gt;z_filefunc, s-&gt;filestream,szComment,uSizeRead)!=uSizeRead)
                 err=UNZ_ERRNO;
@@ -1007,10 +1013,12 @@
 
 
     if (err==UNZ_OK)
+    {
         if (unzlocal_getLong(&amp;s-&gt;z_filefunc, s-&gt;filestream,&amp;uMagic) != UNZ_OK)
             err=UNZ_ERRNO;
         else if (uMagic!=0x04034b50)
             err=UNZ_BADZIPFILE;
+    }
 
     if (unzlocal_getShort(&amp;s-&gt;z_filefunc, s-&gt;filestream,&amp;uData) != UNZ_OK)
         err=UNZ_ERRNO;
@@ -1269,7 +1277,7 @@
         return UNZ_PARAMERROR;
 
 
-    if ((pfile_in_zip_read_info-&gt;read_buffer == NULL))
+    if (pfile_in_zip_read_info-&gt;read_buffer == NULL)
         return UNZ_END_OF_LIST_OF_FILE;
     if (len==0)
         return 0;
</pre></body></html>