updated for version 7.4.026
Problem: Clang warning for int shift overflow.
Solution: Use unsigned and cast back to int. (Dominique Pelle)
diff --git a/src/misc2.c b/src/misc2.c
index 504cf0a..b8655e8 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -6496,13 +6496,15 @@
get4c(fd)
FILE *fd;
{
- int n;
+ /* Use unsigned rather than int otherwise result is undefined
+ * when left-shift sets the MSB. */
+ unsigned n;
- n = getc(fd);
- n = (n << 8) + getc(fd);
- n = (n << 8) + getc(fd);
- n = (n << 8) + getc(fd);
- return n;
+ n = (unsigned)getc(fd);
+ n = (n << 8) + (unsigned)getc(fd);
+ n = (n << 8) + (unsigned)getc(fd);
+ n = (n << 8) + (unsigned)getc(fd);
+ return (int)n;
}
/*
diff --git a/src/version.c b/src/version.c
index ff4e3bb..f875d01 100644
--- a/src/version.c
+++ b/src/version.c
@@ -739,6 +739,8 @@
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
+ 26,
+/**/
25,
/**/
24,