libtiff: warning fixes.

From c4b91566de068780f46ba2aaca78e6f8366b98da Mon Sep 17 00:00:00 2001
From: Ozkan Sezer <[EMAIL REDACTED]>
Date: Sat, 21 Oct 2023 23:33:32 +0300
Subject: [PATCH] warning fixes.

---
 contrib/iptcutil/iptcutil.c | 14 +++++++-------
 libtiff/tif_zstd.c          |  2 +-
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/contrib/iptcutil/iptcutil.c b/contrib/iptcutil/iptcutil.c
index 621716df..92006499 100644
--- a/contrib/iptcutil/iptcutil.c
+++ b/contrib/iptcutil/iptcutil.c
@@ -19,9 +19,9 @@
 
 #ifdef WIN32
 #define STRNICMP strnicmp
-#else 
+#else
 #define STRNICMP strncasecmp
-#endif 
+#endif
 
 typedef struct _tag_spec
 {
@@ -343,12 +343,12 @@ char *super_fgets(char *b, int *blen, FILE *file)
       c=fgetc(file);
       if (c == EOF || c == '\n')
         break;
-      if (((long)q - (long)b + 1 ) >= (long) len)
+      if ((int)(q - b + 1) >= len)
         {
           long
             tlen;
 
-          tlen=(long)q-(long)b;
+          tlen=(int)(q - b);
           len<<=1;
           b=(char *) realloc((char *) b,(len+2));
           if ((char *) b == (char *) NULL)
@@ -363,7 +363,7 @@ char *super_fgets(char *b, int *blen, FILE *file)
       int
         tlen;
 
-      tlen=(long)q - (long)b;
+      tlen=(int)(q - b);
       if (tlen == 0)
         return (char *) NULL;
       b[tlen] = '\0';
@@ -532,7 +532,7 @@ int main(int argc, char *argv[])
                       quoted;
 
                     next=0;
-                    len = strlen(token);
+                    len = (unsigned long)strlen(token);
                     while(tokenizer(0, newstr, inputlen, token, "", "&", "", 0,
                                     &brkused, &next, &quoted)==0)
                       {
@@ -541,7 +541,7 @@ int main(int argc, char *argv[])
                             char
                               *s = &token[next-1];
 
-                            len -= convertHTMLcodes(s, strlen(s));
+                            len -= convertHTMLcodes(s, (int)strlen(s));
                           }
                       }
 
diff --git a/libtiff/tif_zstd.c b/libtiff/tif_zstd.c
index 66135e03..f1c3e204 100644
--- a/libtiff/tif_zstd.c
+++ b/libtiff/tif_zstd.c
@@ -162,7 +162,7 @@ ZSTDDecode(TIFF* tif, uint8* op, tmsize_t occ, uint16 s)
                 TIFFErrorExt(tif->tif_clientdata, module,
                     "Not enough data at scanline %lu (short %lu bytes)",
                     (unsigned long) tif->tif_row,
-                    (unsigned long) (size_t)occ - out_buffer.pos);
+                    (unsigned long) ((size_t)occ - out_buffer.pos));
                 return 0;
         }