mirror of
https://github.com/pi-hole/dnsmasq.git
synced 2025-12-19 10:18:25 +00:00
65c2d6afd67a032f45f40d7e4d620f5d73e5f07d
Bug report here: https://lists.thekelleys.org.uk/pipermail/dnsmasq-discuss/2023q4/017332.html This error probably has no practical effect since even if the hash is wrong, it's only compared internally to other hashes computed using the same code. Understanding the error: hash-questions.c:168:21: runtime error: left shift of 128 by 24 places cannot be represented in type 'int' requires a certain amount of c-lawyerliness. I think the problem is that m[i] = data[j] << 24 promotes the unsigned char data array value to int before doing the shift and then promotes the result to unsigned char to match the type of m[i]. What needs to happen is to cast the unsigned char to unsigned int BEFORE the shift. This patch does that with explicit casts.
Description
No description provided
Languages
C
94.2%
Perl
2.3%
HTML
1.2%
Shell
1.1%
Makefile
0.6%
Other
0.6%