aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNardi Ivan <nardi.ivan@gmail.com>2021-10-18 18:39:07 +0200
committerGuy Harris <gharris@sonic.net>2021-10-18 22:23:33 +0000
commita2e877d39785a6c05b723e9d62865dab3feee5a6 (patch)
treec98a953f4bfe5e1dedf60fe45e227910ab73e121
parentd8742418aa550a12af70fe8d5b5fc9a095dd44ac (diff)
wiretap: fix a warning on Raspberry 4
/home/pi/wireshark/wiretap/file_wrappers.c: In function ‘file_fdopen’: /home/pi/wireshark/wiretap/file_wrappers.c:1136:27: error: comparison of integer expressions of different signedness: ‘__blksize_t’ {aka ‘long int’} and ‘unsigned int’ [-Werror=sign-compare] if (st.st_blksize <= MAX_READ_BUF_SIZE) ^~ cc1: all warnings being treated as errors
-rw-r--r--wiretap/file_wrappers.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/wiretap/file_wrappers.c b/wiretap/file_wrappers.c
index e7aaa5a66a..f82deb3849 100644
--- a/wiretap/file_wrappers.c
+++ b/wiretap/file_wrappers.c
@@ -1133,7 +1133,7 @@ file_fdopen(int fd)
* If the value is too big to fit into a guint,
* just use the maximum read buffer size.
*/
- if (st.st_blksize <= MAX_READ_BUF_SIZE)
+ if (st.st_blksize <= (long)MAX_READ_BUF_SIZE)
want = (guint)st.st_blksize;
else
want = MAX_READ_BUF_SIZE;